Skip to main content

Full text of "motorola :: 6800 :: MicroChroma 68 Oct79"

See other formats


10-1-79 



AN - XXX 



MICRO CHROMA 68 

THE NEW "BUG" 
FROM MOTOROLA 
TVBUG® 

MOS Microcomputer Systems Applications 

Austin, Texas 

Prepared By 

Tim Ahrens 
Jack Browne 
Monitor written by John Dumas 



The information contained in this application note allows the construction of a 
low cost development system. Object code (machine language) programs may be 
entered from the keyboard or loaded from audio cassette tapes and be debugged 
and developed. The programs may be dumped to cassette tape for permanent 
storage. Techniques for increasing system capabilities are included. 



Although the information contained herein, as well as any information provided 
relative thereto, has been carefully reviewed and is believed accurate, Motorola 
assumes no liability arising out of its application or use. Neither does it 
convey any license under its patent rights nor the rights of others. 



Copyright 1979 by Motorola Inc. 



TABLE OF CONTENTS 



MOS HANDLING RECOMMENDATION 



1. INTRODUCTION 

2. Micro Chroma 68 KIT PARTS 

2.1 The MC6808 Microprocessor with Clock 

2.2 The MC6847 Video Display Generator & MC1372 RF Video Modulator 

2.2.1 The MC6847 VDG (Video Display Generator) 

2.2.2 The MC1372 RF Video Modulator 

2.3 The MC6846P3 ROM, I/O, Timer 

2.4 The MC6820/21 Peripheral Interface Adapter (PIA) 

2.5 The MC6850 Asynchronous Communications Interface Adapter (ACIA) 

3. Micro Chroma 68 HARDWARE 

3.1 Hardware Operation 

3.2 Construction Hints 
3.2.1 Micro Chroma 68 Debug 

3.3 Soldering Tips 

4. TVBUG® SOFTWARE 

4.1 TVBUG® Operating System 

4.1.1 G-Go to User Program Function 

4.1.2 L-Load Function Tape (Kansas City Standard) 

4.1.3 P-Punch Function Tape (Kansas City Standard) 

4.1.4 V-Verify Tape (Kansas City Standard) 

4.1.5 M-Memory Change Function 

4.1.6 E-Block Memory Exchange Function 

4.1.7 Q-Quiek Load Function 

4.1.8 M-Memory Fill Function 

4.1.9 0-Offset Calculation Function 

4.1.10 R-Print Contents of MPU Registers 

4.1.11 Z-Clear Screen Function 

4.1.12 Breakpoints 



4.1.12.1 S-Set a Breakpoint with Address "N" 

4.1.12.2 U-Unset a Breakpoint with Address "N" 

4.1.12.3 D-Remove all Breakpoints 

4.1.12.4 B-Print Out all Breakpoints 

4.1.12.5 N-Trace Next Instruction 

4.1.12.6 C-Contine 



4.1.13 User Defined Functions 

4.1.14 User Input Function 

4.1.15 User Output Function 
4.2 Software Example 

5. SYSTEM EXPANSION AND APPLICATIONS 

5.1 Interface EXORciser Bus 

5.2 Extra ROM/PROM Utilization 

5.3 Composite Video from MC6847/MC1372 



TABLE OF CONTENTS (con't.) 



5.4 Use of MCI 372 

5.5 RS-232 Drivers for Printer 
5.5.1 Software for Printer 

5.6 S1-S9 Punch/Load Software 

5.7 Dynamic RAM Addition 
5.7.1 4K or 6K Dynamic RAMs 

5.8 Graphic Mode Control 



s 



4 



(e.g. space bar). The modifier will be either two or four hex characters 
depending on the command mode. When entering hexidecimal data, i.e. memory 
examine function, the data entered is right-hand justified. For example: A 
desired address $015F is to be entered in the memory examine function. All that 
need be entered is $15F. If an error is entered ($1 5E) just type $015F following 
the previously entered three digits. The TVBUG firmware may be used to debug and 
evaluate a user program and to perform the following functions: 

1) G - Go to Address "N" (User Program) 

2) L - Load Kansas City Standard Tape (JBUG® Format) 

3) P - Punch/dump Kansas City Standard (JBUG Format) 

4) V - Verify Kansas City tape 

5) M - Memory change 

6) E - Examine a block of memory 

7) Q - Quick load of Hex Data 

8) F - Fill a block of memory 

9) 0 - Offset calculation 

10) R - Display contents of MPU registers 

11) Z - Clear screen and initialize I/O 

12) S - Set a breakpoint with address "N" 

13) U - Unset breakpoint with address "N" 

14) D - Delete all breakpoints 



15) B - Print out all breakpoints 

16) N - Trace the next instruction 

17) C - Continue execution from the current location 

18) T - Trace "N" instructions 

19) - User defined functions 

4.1.1 G - Go to User Program Function 

This function allows the user to execute a USER program. To use this function 
type a "6", starting address, and ret urn. The firmware will execute a USER 
program. 

4.1.2 I - Load Tape Function (Kansas City Standard) 

The function allows the user to load a Kansas City Standard formatted audio 
cassette tape. This includes tapes punched using Motorola's JBUG® and CRTBUG® 
monitor. To use this function: 

1. Press Reset 

2. Type "L". The firmware will CRLF and ask for an offset, (16 bits, 
Hexadecimal, with leading zeros assumed). 

3. Enter the offset. The offset must be the difference between the existing 
start address and the desired start address; if none, type a space. 

4. Type "return 11 . Start the tape by pressing "play" on the cassette recorder. 
Insure that the recorder "ear" to P.C. board "ear" is connected. 

5. After approximately 40 seconds of leader, the firmware will print a name if 
any, and a "B" for each 256 bytes and a "B" for the remainder, if any. If 
the data was not stored into memory correctly, the "B" is followed by the 
message, "MEMORY BAD" and the firmware will return to TVBUG program control. 

4.1.3 P - Punch Tape Function (Kansas City Standard) 

This function allows the user to store data from memory on audio cassette tape 
using the Kansas City Standard. To use this function: 

1. Press Reset. 

2. Type "P". The firmware will CRLF and ask for a beginning address. 

3. Enter beginning address and type a space. The firmware will ask for a 
ending address. 

4. Enter ending address. The firmware will CRLF and ask for a name. 

5. Enter the name. The name may be up to 32 (31 + CR) characters long. If 
tape must be read by a JBUG monitor, do not use "B" or "G" in the name as 
these characters are interpreted by the JBUG firmware as control characters. 

6. Connect the tape recorder "mike" to the P.C. board "in" (P3) and start 
recording. 

7. Type return. The firmware will print 40 seconds of leader (F's) followed by 
an 80 (Start Char.), Name (ASCII Code), Byte count, Starting Address, and 
"42" (ASCII "B") followed by data. A short leader terminated with "42" 
(ASCII "B") will be printed for each 256 bytes. 

4.1.4 V - Verify Tape (Kansas City Standard) 

This function is used to verify a PUNCH or LOAD operation. To use this 
function: 

1. Press Reset. 

2. Enter a "V". The firmware will CRLF and ask for an offset. 



3. Enter the offset. The offset must be the difference between the existing 
start address and the desired start address; if none, type a space. 

4. Set up the tape recorder as shown in the load function. 

5. The firmware will print file name, CRLF, and print a "B" for each 256 bytes. 
If the data on the tape and the contents of the memory do not agree, the 
firmware will print "MEMORY BAD" and return to TVBUG program control. 

4.1.5 M - Memory Change Function 

The function will examine a location in memory, change the contents if desired, 
and return the contents to memory in that order. To use the MEMORY CHANGE 
function: 

1. Enter an "M". 

2. Enter the address to be changed and press line feed. TVBUG firmware will 
CRLF and print the address followed by data. 

3. Enter new data if desired. Line feed will then return data to memory and 
open the next location. Up arrow Ct) will return data to memory and open the 
previous location. To return to TVBUG control program, press the carriage 
return key. 

TVBUG 
M 0 

0000 XX 00 

0001 XX 00 
TVBUG 

4.1.6 E - Block Memory Examine Function 

This function allows the user to display a block of memory on the screen. To 
use this function: 

1. Enter an "E". 

2. Enter the beginning address of the block to be examined and type a space. 
The firmware will ask for ending address. 

3. Enter an address and type a space. 

4. The firmware will CRLF and print the beginning address and contents of the 
first eight memory locations. Underneath the contents of each location is a 
period. If the data at that location is an ASCII character, the character 
will be printed under the data. Each time a space is entered, the next 8 
locations will be printed until it reaches the ending address; at which time 
the firmware will return to the TVBUG control program. 

TVBUG 
E 

BEG ADR?0 END ADR?F 

0000 54 56 20 42 55 47 XX XX 
T V BUG.. 
0008 XX XX XX XX XX XX XX XX 



TVBUG 

4.1.7 Q - Quick Load Function 

This function allows the user to enter blocks of hex data using the MEMORY 
EXAMINE function. To use this function: 



1. Type "Q". The firmware will CRLF and ask for the beginning address. 

2. Enter beginning address and type a space. The firmware will ask for the 
ending address. 

3. Enter ending address and type return. The firmware will CRLF, print the 
beginning address and wait for data. 

4. Enter hex data followed by a space. The firmware will CRLF on the 8th 
location, print the address and wait for data. When the ending data has been 
entered, the firmware will return to TVBUG control program. 

Typical Display 

TVBUG 

Q 

BEG ADR?0 END ADR7F 



0000 XX XX XX XX XX XX XX XX 
0008 XX XX XX XX XX XX XX XX 
TVBUG 

4.1.8 F - Memory Fill Function 

This function allows the user to fill a block of memory with a character. To 
use this function: 

1. Enter an "F". The firmware will CRLF and ask for the beginning address. 

2. Enter the beginning address and type a space. The firmware will ask for an 
ending address. 

3. Type a space. The firmware will CRLF and ask for a character. 

4. Enter the desired character and type return. The firmware will write the 
character into each of the defined memory locations and return to TVBUG 
program control . 

Typical display for MEMORY FILL function: 

Note: Filling Stack RAM may result in loss of control as the MPU may execute an 
un implemented opcode. 

BEG ADR? XXXX END ADR? XXXX 

CHAR? XX 

TVBUG 

4.1.9 0 - Offset Calculation Function 

This function allows the user to calculate 16-bit offsets. If the offset is 
outside the 8-bit ,, branch ,, limits, the firmware will print the offset followed 
by the message "TOO FAR". This function simplifies the calculation of offsets 
for branch instructions. To use this function: 

1. Type an "O". This firmware will CRLF and ask for the beginning address. 

2. Enter the address of the branch op code and type a space. The firmware will 
CRLF and ask for the ending address. 

3. Enter the address of branch destination and type return. The firmware will 
CRLF, print the offset and return to TVBUG control program. Offsets will be 
printed as a 16-bit word. The least significant 8 bits will be the offset. 



Positive Offset: 
0 

FEG ADR?0 END ADR?F 
OFFSET = OOOD 
TVBUG 

Negative Offset: 
0 

FEG ADR?F END ADR?0 
OFFSET = FFEF 
TVBUG 

Offset Outside of an 8-bit branch: 
0 

FEG ADR?0 END ADR? 82 
OFFSET = 0080 TOO FAR! 
TVBUG 

4.1.10 R - Print contents MPU Registers 

This function allows the user to examine the MPU registers by reading them from 
the stack. To use this function type "R". The firmware will place contents of 
the MPU registers onto the stack RAM and then place them on the screen in the 
following format: 

CC B A X P S 
XX XX XX XXXX XXXX XXXX 

Where: 

CC = Condition Code register 

B = B accumulator 

A = A accumulator 

X = Index register 

P = Program counter 

S = Stack pointer 

4.1.11 Z - Clear Screen Function 

To use this function type "Z". The firmware will fill the display memory block 
with a space character, clear the screen, initialize the system I/O ports, and 
# return to TVBUG program control. 

4.1.12 Breakpoints 

There are 7 TVBUG commands dealing with breakpoints. 

1) S - Set breakpoint with address "N". 

2) U - Unset breakpoint with address "N". 

3) D - Delete all breakpoints 

4) N - Next instruction 

5) T - Trace "N" instructions 

6) C - Continue execution from current location 

7) B - Print out all breakpoints 

4.1.12.1 S - Set A Breakpoint with Address "N" 



To set a breakpoint type an "S" followed by the address, then type return. The 
firmware will print the breakpoint address with up to 7 additional breakpoints 



that might be set, and return to TVBUG program control. 
Note: Breakpoint $0000 is illegal. 

Typical Display for NEXT Instruction: 

XX XX XX XXXX 0030 XXXX 

TVBUG 

N 

XX XX XX XXXX 0032 XXXX 

TVBUG Typical display for Setting Breakpoints: 

TVBUG 

S 10 

0010 

TVBUG 

S 20 

0010 0020 
TVBUG 
S 30 

0010 0020 0030 
TVBUG 

4.1.12.2 U - Unset A Breakpoint with Address "N" 

To unset a breakpoint type a "U" followed by the address, then return. The 
firmware will remove the breakpoint and return to TVBUG control program. 

Typical Display for Unsetting Breakpoints: 

TVBUG 

U 10 

TVBUG 

U 20 

TVBUG 

4.1.12.3 D - Remove all Breakpoints 

To remove all breakpoints, type a "D". The firmware will remove the breakpoints 
and return to TVBUG program control. 

4.1.12.4 B - Print Out all Breakpoints 

To examine breakpoints type a "B". The firmware will print all breakpoints and 
return to TVBUG control. 

NOTE: The following commands assume that a program has been exeucted and halted 
at a Breakpoint. 

4.1.12.5 N - Trace Next Instruction 

This command allows the user to single step through a series of instructions. 
To use this command, type an "N". The firmware will execute the NEXT instruction 
and print the contents of the MPU registers. It will then return to TVBUG 
program control. 



4.1.12.6 C - Continue 



The Continue command is used to step the program from breakpoint to breakpoint. 
To use this command, type a "C". The firmware will execute the user program from 
the current location to the next breakpoint, and print out the contents of the 
stack. 



Typical Display for CONTINUE Instruction: 
(Breakpoints set at $0030, $0040, $0050) 

XX XX XX XXXX 0030 XXXX 

TVBU6 

C 

XX XX XX XXXX 0040 XXXX 

TVBUG 

C 

XX XX XX XXXX 0050 XXXX 
TVBUG 

4.1.13 User Defined Functions 

TVBUG contains three user defined jumps that may be called from the keyboard and 
two user defined jumps called by the monitor. All jumps are initialized with a 
Reset. However, if the user wishes to prevent these vectors from being lost on 
Reset, the stack RAM may be hardware deselected from $F390, to $F39F inclusive. 
A small ROM, containing the permanent vectors, is patched over these locations 
(see listing in appendix B) as shown in Figure 4.2. 



AfS - 
A/4 - 
A/3 - 
AlZ - 

KC\ - 

Ato - 

A9 - 
Ag - 

A7. - 
At> - 

A~s - 

A* - 



< 



/o 



Jl 



J2 



13. 



I 



y 



74tSJ33 



± 





__7Z> 



Figure 4.2 Hardware Deselect of Stack RAM from $F390 to $F39F 



To use the keyboard jumps, type the appropriate character (!,",#). Firmware 
will then execute the program from the address stored in temporary RAM at the 
following locations: 



CHAR. 



INST. ($7E) 
$F396 
$F399 
$F39C 



HIGH BYTE 
$F397 
$F39A 
$F39D 



LOW BYTE 
$F398 
$F29B 
$F39E 



4.1.14 User Input Function 



This function flowcharted in Figure 4.3 allows the user to insert a user routine 
into the monitor input loop. Each time the monitor goes around its input loop it 
checks the user input three byte vector. Since it is initialized to RTS, the 
monitor will ignore this vector until the user changes it. The three temporary 
RAM locations reserved for the user input vector are: 



INST. (7E) 
$F390 



HIGH BYTE 
$F391 



LOW BYTE 
$F392 



To use this function, first write the user vector into stack. 




Figure 4.3 Flowchart for User Input Function 



Example: 

LDAA: User vector (High Byte) 
STAA: $F391 

LDAA: User vector (Low Byte) 
STAA: $F392 
LDAA: #$7E 
STAA: $F390 

Initialization complete 

If this vector is entered with the keyboard, the jump instruction (7E) must be 
entered last. 

The USER INPUT routine must set the carry bit if there was a user input. If 
there was no input it must clear the carry bit. All user I/O routines must end 
with RTS. 

4.1.15 User Output Function 

This function flowcharted in Figure 4.4 allows the user to insert a user output 
routine into the monitor output routine. Each time the monitor performs its 
OUTCH (output character) routine it checks the three temporary RAM locations 
reserved for the user output vector. 

Since these locations are initialized to RTS, the monitor will ignore them until 
they are changed by the user. 



To use this function, write the jump vector into temporary RAM. If the vector is 
left in temporary RAM, I/O devices such as a printer or a modem may be 
controlled on the fly by changing the instruction location ($F393) from the jump 
($7E) to an RTS ($39). All user I/O routines must end with RTS. 



INST. (7E) 
$F393 



HIGH BYTE 
$F394 



LOW BYTE 
$F395 



YES 




NO 



RTS 




RTS 



Figure 4.4 Flowchart for User Output Routine 



4.2 Software Example 



The following example program is suitable for gaining familiarity with the TVBUG 
monitor features* The program adds the five values in locations $10 through $14 
using Accumulator A and stores the final result in location $15. The 
intermediate total is kept in Accumulator A; Accumulator B is used as a counter 
to count down the loop. The Index Register contains a "pointer" (i.e., X 
contains the address) of the next location to be added. The program, as follows, 
contains an error which will be used later to illustrate some of TVBUG's 
features. 

In the following listing, the leftmost column contains the memory address where 
a byte (8 bits) of the program will be stored. The next column contains the 
machine language op-code and data for a particular microprocessor instruction. 
The next four columns contain the mnemonic respresentation of the program in 
assembler format. 

★ 



*Add 


5 numbers 


at locations 


10-14 






*Put 
* 


answer in 


location 15 








0020 


8E 


STRT 


LDS 


$FF 


DEFINE STACK IN USER AREA 


0021 


00 










0022 


FF 










0023 


4F 




CLRA 




TOTAL = 0 


0024 


C6 




LDAB 


#4 


INITIALIZE COUNTER 


0025 


04 










0026 


CE 




LDX 


#$10 


POINT X TO LOCATION 10 


0027 


00 










0028 


10 










0029 


AB 


LOOP 


ADDA 


0,X 


ADD 1 LOCATION TO TOTAL 


002A 


00 








002B 


08 




I NX 




POINT X TO NEXT LOCATION 


002C 


5A 




DECB 




DONE ALL 5 LOCATIONS? 


002D 


26 




BNE 


LOOP 


BRANCH IF NOT. 


002E 


FA 










002F 


97 




STAA 


$15 


SAVE ANSWER 


0030 


15 










0031 


3F 




SWI 




GO TO TVBUG 



A detailed procedure for entering and debugging this program is shown in the 
following steps. 

1. Start up and enter the program in RAM 

A. Turn power on. Push reset button on the card. TVBUG will respond 
as shown in Figure 4.1. 

B. Type M followed by 20CR. This displays the current contents of location 
$0020. 

C. Type 8E. This replaces the contents of $0020 with 8E which is the op-code 
for the first instruction, LDS. 

D. Type LF. This steps to the next location ($0021) and displays the 
contents. 

E. Type 00. 



F. Type LF. 

G. Type next byte of op-code or operand (FF in this case). 

H. Repeat steps F and G for remaining instuctions. 

I. Type CR to close the memory change function. 

2. Verify that the program was entered correctly. 

A. Type M 20 CR. Location 20 will be displayed. 

B. Type LF. Next location will be displayed. 

C. Repeat step B until done, visually verifying data entered in Step 1. 

D. Type CR. 

3. Enter Data in Locations 10-14 

A. Same as 1 except type M 10 CR to start the sequence. Any data may be 
entered; however, for purposes of this example 01,02,03,04 and 05 should 
be entered. 

B. Type CR 

4. Verify Data 

A. Repeat step 2 except type M 10 CR to begin the sequence. Verify that the 
memory contains the values 01,02,03,04 and 05 in sequencial order. 

5. Run the Program 

A. Type CR to insure no other option is active. 

B. Type G 20. The program will run down to the "SWI" instruction at location 
31 which will cause it to go to TVBUG and show the following display. 

CC B A X PS 

DO 00 OA 0014 0032 00G8 

TVBUG 

6. Check the Answer 

Type M 15 CR. (The answer is stored in location 15). Note that it says $0A 
(decimal 10). The correct answer is $0F or decimal 15; therefore, there is 
a problem in the program as originally defined. The next steps should help 
isolate the problem and correct it. 

7. Breakpoint and Register Display 

A. It might be helpful to see what the program was doing each time it went 
through the loop. Therefore, set a breakpoint at the beginning of the 
loop, location 0029. To do this type S 29 CR. 

B. A breakpoint could also be set at location 002F to see the results. Type 
S 2F CR. 

C. TVBUG must be told where to begin, so type G 20. TVBUG will run to the 
breakpoint and then display 0029 as the program counter. At this point 
the program is suspended just before location $29 and is in TVBUG. On 
detecting this breakpoint, TVBUG automatically displays the register 
contents. 

D. Type C to return to the example program and resume executing. Since the 
breakpoint at location $0029 is in a loop it will again be the next 
breakpoint. At this point the register contents will be displayed again. 



33 



If this were done the A Register would appear to contain the partial sum 
and the B Register would be decremented. The X Register would be 
incremented by one. 

E. Type C (Proceed). Once again the registers contents will be 
displayed. 

F. Type C (Proceed). Same comment as D. 

6. Type C (Proceed). Display will now show register contents as of 

breakpoint at $2F. The program has now successfully completed the loop 4 
times and the A-Register contains the incorrect sum. 

8. Correcting the Program 

A. From above it is evident that although the program was supposed to add 
five numbers, the loop was executed only four times. Therefore, the LDAB 
#4 instruction at location 24 and 25 should have initialized B to 5. 

B. Type D. Clear existing breakpoints. 

C. Type M 25 CR. This display = 0025 04. 

D. Type 05. The display * 0025 0405 enter 05. This will now permanently 
change the LDAB #4 instruction to a LDAB #5 instruction. 

E. Type CR 

F. Type G 20. Execute the program. 

G. Type M15 Display = 0015 OF, the expected answer; the program is fixed. 

9. Trace Through the Program 

A. In order to execute a trace, the program must first be stopped at a 
breakpoint. To trace from the beginning do: 

B. Type D. This clears the existing breakpoints. 

C. Type S 20. This sets a breakpoint at the first instruction. 

D. Type G 20 (go to user program). TVBUG will immediately get the breakpoint 
and stop before executing the instruction at 20. 

E. Type N. The program will execute one instruction and display all register 
contents. To continue, type N. 

F. To trace multiple instructions type T followed by the hexadecimal number 
of instruction to be traced. Register contents will be displayed after 
execution of each instruction. 

G. All Breakpoints should be deleted by typing D CR before hitting Reset, or 
the program will be permanently altered. 

10. Offset Calculation Including Register Modification 

A. Assume the SWI instruction at location 31 is to be changed to a branch 
always (BRA) to location 20. This will cause the program to remain in an 
infinite loop (i\e., the program has no end and will run continuously 
unless interrupted by some outside stimuli). Type M31 to open the memory 
location. The display = 0031 3F. 

B. The op-code for a BRA is a 20, so type 20 LF. The display = 0031 3F 20. 

C. The second byte of the BRA instruction should be the two's complement 
negative offset to location 20. Type 0. 

D. TVBUG will respond with "BEG ADR?". Type in the address, 31 CR, of the 
BRA op- code. 

E. TVBUG will respond with "END ADR?". Type in the desired branch address, 
20 C/R. 

F. TVBUG will respond with "OFFSET=FFED\ 

G. Type M 32 CR. 

H. Insert the branch offset by typing the last two hex digits, ED. 



3# 



11. Executing and Aborting 



A. Type G 20. The program will begin executing and the TVBUG cursor will 
disappear since the program now contains an infinite loop. 

B. Hit the break switch. This interrupts the program, displays all 
registers, and returns control to TVBUG. 

C. Type C. Program will again continue execution. 

D. Repeat B and D as many times as you wish. 

E. Reset may be used to halt the program, reinitialize the screen and the 
I/O. 

12. Punch Program to Cassette 

A. Rewind the cassette. 

B. Press RESET. 

C. Type P. 

D. Type 20 CR for the begin address. 

E. Type 32 CR for the end address. 

F. Type in an optional title up to 31 characters and CR. 

G. Turn on the cassette player in the Record mode. 

H. Wait for the prompt and cursor to reappear (approximately 60 seconds). 

13. Load Program from Cassette 

A. Turn off power. This will cause the program in memory to be lost. Turn 
power back on. 

B. RESET 

C. Rewind cassette. 

D. Start cassette in playback mode. 

E. Type L. Wait for the TVBUG prompt and an offset (0) followed by a CR. 
Each 'B 1 represents 256 bytes of data being loaded. Test the program by 
any of the options described above. 

14. Verify Program from Cassette 

A. Push Reset button and get TVBUG prompt 

B. Rewind cassette 

C. Start cassette in playback mode. 

D. Type V and an offset (0) followed by a V. 

E. Each "B" represents 256 bytes of data being verified. The TVBUG prompt 
represents a complete verification of the cassette tape. 

5. SYSTEM EXPANSION AND APPLICATIONS 

The wire wrap area may be used to implement several applications and expand the 
system capabilities and usefulness. 

5.1 Interface EXORciser Bus 

As packaged, TVBUG can full fill a multiple of applications, but does lack one 
thing, and this is the necessary components to expand. Uses of this expansion 
can be for additional memory, ROMS, peripherals and the like. 



Looking at Figure 5.1, the address lines are connected to 8T97 three-state 
buffers which jsolate the MRU bus from the edge connector/motherboard. Because 
the data bus is a bi-directional bus, provision has been made to provide two-way 
buffering. The driver enable signal for the 8T26's is provided by an 8 input 
NAND gate. This gate is necessary because certain addresses must be excluded 
S 1 !™ 1 " th ? READ mode - These include the TVBUG ROM (F800-FFFF), Display RAM 
($D000-E3FF), F400-F7FF (I/O), $F000-F3FF (Stack) and (E800-EFFF). This last 2K 
slot may be used for external routines in ROM and RAM and if desired could be 
placed on an external card. Delete the two connections to the gate if off-board 
operation is desired. If non-inverted data is desired, use 8T28's in place of 
8T26's. This design assumes that all user RAM will be external. 



Bus 



Al 

At 

A* 

*«- 

A5 



Afc 
A* 
At 
A* 



At! 
A* 

m 

0Z 



'01 
03 



w 

OS 

Mr 
m 



40 



~Al 
- A2 



.A3 



m 



.At, 



7T 



. AT 
. A8 
. A<5 
Ale 
. All 



em 



J*. 



. A»l 
Art 



. A* 

A/5 



33- 
an* TL 



/3 



1X6 

Of 
D3 



<: 



2- 



*I9T 



T3J 



P4 

05 

in 



VMA 



J *Z CB) 

1 Z/Z 

2 . PBco- erne 



poo* * W9*e (ctml*) 
+5 



Figure 5.1 TVBUG Expansion to an Outside World 



36* 



5.4 Use of MC1372 



By configuring the MC1372 as a composite video generator, its output can be fed 
through coaxial cable to drive a remote MC1373 RF modulator. In some 
applications it is more advantageous to transmit a composite video signal down 
line rather than an RF. See Figure 5.4. 




Figure 5.4 Remote RF with MC1372 



5.5 RS-232 Drivers for Printer 

To implement a "screen" printer for TVBUG, all that is required is to write 
driver software, (Appendix C) and hook up either RS-232 or TTL drivers for a 
printer. See Figure 5.5. 




Note: See Appendix C for Software Drivers 

Figure 5.5 Use of On-Board ACIA for Hard Copy (Printer) 



5.5.1 Software for Printer 



By using the user output routine provided in TVBUG, a character may be sent to a 
peripheral output device. Here's how it works: Everytime TVBUG performs an 
output character (OUTCH) routine, it checks three memory locations in the Stack 
RAM area. Since these routines are initialized to RTS, the monitor will ignore 
them until changed by the user. The program listing provided changes these 
locations to a JSR at the beginning location of the program. At this time, the 
OUTCH routine cycles through this additional subroutine and prints a character 
to whatever is connected to the on-board ACIA. 

The on-board ACIA was used for the printer driver to save money, and to reduce 
the number of additional components. The present ACIA configuration will allow a 
character rate of 300 baud (from tape interface MC1455), but may be changed to 
allow any character rate when provided with the appropriate clock frequency 
(divide by 16). Because TVBUG only responds to carriage returns, a line-feed and 
4 null characters are sent to the printer during a carriage return operation. 
This allows a printer to return fully to the left-hand most position before the 
continuation of printing. 

It must be noted that printing will take place during punch and load operations, 
but will not provide the necessary CR's and null characters for proper printing. 
Although the use of an input device (serial or parallel) is not shown, its 
operation would be similar to that of the print routine. See User Input routine 
for further details. 

5.6 S1-S9 Punch/Load Software 

As purchased, TVBUG has the capability of loading and punching Kansas City 
Standard formatted tapes which utilize the MEK6800D2 binary style. Many styles 
of format have been used in the KC Standard, one of the most widely known is the 
format of MIKBUG®/MINIBUG®/EXBUG®, or the S1-S9 format. A program has been 
written which allows the TVBUG user to load and punch this type of tape format. 
See Appendix C. To use the S1-S9 system, type G $E803 CR. A prompt will ask 
whether to punch, load or verify. If during a load or verify operation a bad 
memory location is found, its address will be displayed. Each "S" displayed 
represents 19 characters dumped, loaded or verified. 

5.7 Dynamic RAM Addition 

Due to its high density and low relative cost, dynamic RAM has proven to be one 
of the most economical routes when designing systems which must have access to 
large areas of memory. TVBUG can be easily adapted to a full complement of user 
RAM 52K by the construction of the memory board shown in this application note. 

5.7.1 4K or 16K Dynamic RAMs 

4K or 16K Dynamic RAMs require a periodic "refreshing" to retain integrity of 
what is stored there. There are several methods of providing this refresh which 
include cycle stealing and transparent refresh. The board shown utilizes the 
transparent method and appears static to the processor. It appears static 
because all refresh is done during 01 or E low time. Fast RAMs must be used, 
because a refresh and access cycle must be performed in one MPU clock cycle. The 
system shown uses the MC3480-MC3242A combination of RAM controllers with delay 
lines providing the required "t" times. One shots could be utilized in place of 
these delay lines if they provide the correct amounts of delay. See MC3242A data 
sheet. 



MC6809-6800 64K Transparent 
Refresh Dynamic RAM Card 



X 32 pe*. 




* "< J242 



Note: Only one of eight 
columns are shown. All 
elements of Row 1 should be 
connected to RAS1, Row 2, to 
RAS2 etc. Only if not using 
4K Dynamic RAMS. 



Figure 5.6 Transparent Refresh Dynamic RAM Card 



1 




Figure 5.7 Refresh Logic 



The actual schematic, and timing for the Transparent refresh method is shown in 
Figures 5.8-5. 10. Memory clock (unstretched E) is fed into both MC3480 and 
SN74LS90. The LS90 is used to divide MC to give a 89 KHz pulse for the refresh 
clock. Although faster than the minimum 64 KHz required, this does nothing more 
than refresh at a higher rate. The other MC is fed into the MC3480 memory 
controller. Through the use of a flip flop and delay lines, the different timing 
requirements are provided for the MC3480. Although more expensive, the delay 
lines are far superior to using one shots whose external components can drift 
considerably with temperature variations. The MC3480 provides the RAM array with 
the necessary RAS and CAS signals, while the MC3242A provides the required 
- addressing sequences, Chip enables cane from the 74LS138-74LS30 combination and 
allow the user to have any or all 8K blocks of memory within the 6K memory map 
selected. 

5.8 Graphic Mode Control 

The Micro Chroma 68 printed circuit board has the capability of fully exploiting 
all VDG graphic modes. The mode select pins of the VDG are connected to the 
peripheral data port of the MC6846 RIOT. By writing the appropriate "word" to 
the port, any of the graphic modes may be selected. For example: to use the most 
dense (2 color) graphics mode, do the following: 

M F441 80 00 Resets Port 

F442 00 FF Sets as all outputs 
F443 39 Control word output 

The word '39' is the control word for the most dense graphic mode. For other 
control words, see Figure 5.11. From this point on (initialization of the RIOT), 
any word placed in location $F443 will be written to the VDG. Remember that a 
Reset will reset the 1/0 port and thus require re-initilization. 



^3 



4% /6KJi- 

Potiops 




3<*}|TCM W S£iSC7€X> 

51 oooo- I w ' ' ^ 

52 ZOOO - 



660O - TW? 

55 aoco - 

5fc AOOO - BRtr 

S7 coco - pffr 

se pooo - F^rc 



AJbM* G>Mf/*Joovs. 



Figure 5.8 Chip Select Logic 



WAS* 



Hit* 























:..V//*. 




.„.;?//>:. 






-t 



















i 










: 

r- 


-jr.; 




















4 



St? 7 



o 
o 



tzi 



oetAy 





T 






O 






o 











III 


Kill 









Si -fcru SS 



Figure 5,9 Suggested Layout 



HEX VALUE TO 





DFSTTY 


RArKGRflllNn 

DMUlN.URUUI'lU 


fiRAfi t /n 

O o*T O i / u 


MFMOD V DCnilTDCn 


Two Color Graphites 


256 x 192 


GRN 


$39 


6K x 8 




256 x 1 Q? 


RUFF 
our r 


<3ft 
$o o 


Ul\ A O 


Colors 


128 x 192 


GRN 


$29 


3K x 8 


BUFF GREEN 


128 x 192 


BUFF 


$28 


3K x 8 




128 x 96 


GRN 


$19 


2K x 8 




128 x 96 


Rl IF F 
Dur r 


$1 o 


CK X O 




1 ?Q v 

ItO A 0*? 


V3r\n 




1 J/ v Q 
I l\ X O 




LCo X 0*f 


DUr r 




In X o 


Fftiir* Pftl fty* fryanhifc 
rUUi UUI Ul vji ajJll ltd 


nFKKTTY 
ULllol 1 I 


rni fiD<? 


Ml A VnLUt 


MCMftD V D CHI 1 TD CH 




1 po *, i go 

IcO A x.74> 


A 




fcK Y ft 




128 x 1Q? 

1LO A IjC 


R 


ton 


f^K Y ft 
Dl\ a O 




128 x 96 


A 


$21 


3K x 8 


COLORS 


128 x 96 


R 

u 




IK y ft 




128 x 64 


A 


$11 


2K x 8 


A B 


128 x 64 


R 

u 




C-IN A O 


Green Buff 


64 x 64 


A 


$01 


IK x 8 


Yellow Cyan 


64 x 64 


B 


$00 


IK x 8 


Rl up Maopirfri 










Red Orange 










ALPHA/SEMI -GRAPH ICS 












BACKGROUND 




HEX VALUE 


MEMORY REQUIRED 


INTERNAL ROM 


GRN 




$47 


512 x 8 




ORG 




$46 


512 x 8 


EXTERNAL ROM 


GRN 




$43 


512 x 8 




ORG 




$42 


512 x 8 



ACTUAL CONNECTIONS 
6846 



P0 CSS 

PI A/G 

P2 INT/EXT 

P3 GMO 

P4 GM1 

P5 GM2 

P6 INV 

P7 N.C. 



Figure 5.10 Graphic Mode Control 



Appendix A 

The Micro Chroma 68 Schematic, parts list, and assembly drawings and 
construction hints are included for reference. 

Appendix B 

The following software listing contains the monitor jump table and temporary RAM 
locations as well as other useful routines. 

Note: Only the jump table and temporary RAM locations will be guaranteed on 
furture versions of TVBUG. Caution should be exercised when using any other 
routine. 

Appendix C 

TVRTS is a listing of the RS-232 driver software and the S1-S9 Loader/Punch 
software. 

Appendix D 

The following are patches for TSC Software Packages. To covert to TVBUG, first 
load the original TSC Program.. This can be accomplished by using the S1-S9 
loader featured in Appendix C. 

After loading, enter the following patches for each program. This can most 
easily be dene by the memory Examine/Change function. Then punch on TVBUG tape. 



D-1 



+ 5V •*+ • f— — < +5V 

I C1.C15, C20-23, C26-57 | | N 

1 1 <GND 




2) ALL CAPACITORS SHOWN ARE IN MICROFARADS, 
=U0%, CERAMIC OR DISC 

3) GROUND ALL UNUSED GATES 



"ANT SPECIFICATIONS, DRAWINGS OH REPRINTS. OR DATA 
FURNISHED TO IIDOU OR SELLER SNAIL REMAIN MOTOROLA'S 
PROPERTY, SMALL K KEPT CONFIDENTIAL, SHALL IE USEO FOR 
THE PURPOSE OF COMPLYING WITH MOTOROLA'S REQUESTS FOR 
QUOTATION OR WITH MOTOROLA PURCHASE OR&ERS A HO SHALL 
•E RETURNED AT MOTOROLA'S REQUEST. PATENT RIGHTS 
EMtODIED IN DESIGNS. TOOLS. PATTERNS. DRAWINGS, OEVICES. 
INFORMATION AND EQUIPMENT SUPPLIED IT MOTOROLA PUR- 
SUANT TO THIS REQUEST FOR QUOTATION OR PURCHASE ORDER 
AND EXCLUSIVE RIGHTS FOR THE USE IN REPRODUCTION THEREOF 
ARE RESERVED IV MOTOROLA." 



CHECKED RT 



DATE 



CHROMA 68 
SCHEMATIC 



MOTOROLA INC. 

INTEGRATED CIRCUIT DIVISION / MOS 
3SOI CD BLUE STICK, AUSTIN, TCXAS TtTtl 



RU614-CHROMA 68 





CQHPUROUTE W/O 02-7130 MOTOROLA 

IfflCRO CHROMA 68 & - . 

.LATER 1 —ASSEMBLY n&»*NG<~-*--' 




MCROCHROMA 68 PARTS LIST 



HICROCHRQHA 68 PARTS LIST (CONTINUED) 



MICROCHROHA 68 KITS PARTS LIST (CONTINUCO) 



Uy ief Dm 

C1-C3. C7. CIO. €13. 
CIS, C20-23.C26-S7 

C4, CSS 

cs 

€6 

Ci, CU. CM. CIS 
CS 

€12 

CI6, C2S 
C17 
€18 
€24 



Rl 
R2 
83 
84 

88. 810-12, 82S, 830 

86 

87 

88, 813 
88 

814, 81S, 818 
816 ' 
811 

819, 834 

R20, R23-25. R28, R31-33 
821 

R22, 827 
826 



Value 

,luF 

100 uF 0 16V electrolytic 

8-36pF Variable 

SOpF 

.OluF 

.002uF 

S6pF 

lOOOpF 

.02uF 

ISOOpF 

2700pF 



Sk Pot 

10k Pot 

910 

22k 

3.3k 

ISk 

33k 

8.6k 

360 

240 

7S 

ISO 

10k 

100k 

Ik 

2k 

20k 



Motorola jnteo/fttd Clrcultf 
Quantity Bef Das 



1 
2 
I 

I 
1 
t 
1 
I 
1 
3 
I 
1 
2 
4 
1 
1 
1 
2 
2 
30 



Ul 

U2, U12 
U3 

U4 
US 
06 
U? 
U8 
US 

U10, U14U1S 
Ull, U14 
U16 

U17, U18 
Ul% U22-24 
U20 
U21 
U2S 

U26, 1127 
U26, U2S 
U30, U59 



P/8 
MC14SB4B 
MC140138 
MC6850* 

MC6847* 

MC1372* 

MC14070B 

MC140408 

MC146S 

HC6820/6821* 

SN74LS00 

SN74LS04 

MC6846P3* 

MC6683/8T97 

SN74LS138 

SN74LS21 

HC14001S 

HC6608* 

HC68898r8T28 

SM74LS08 

MCM2U4-4S 



Description 

CMOS Htx Schmltt Trigger 

CMOS Dual 0 FJtp-Floo 

NHOS Asynchronous Communications Interface 
Adapter (ACIA) 

MHOS Video Display Separator (VOG) 

Linear Color TV Vldto Modulator Circuit 

CMOS Quad fxclui Ive-OB fiat a 

CMOS 12-811 Unary Countar 

Linear Timing Circuit 

IHOS Parallel Interface Adaptor (PIA) 

TTL Quad 2-Input HAND 6a to 

TTL Mo* Inverter 

ROM, I/O, Timer (RIOT) w/TVBUG 1.2 Monitor 

Linear Max Three-State Buffers 

TTL 3- to- 8 Lino Oocodor 

TTL Dual 4- Input AND Sato 

CMOS Quad 2- Input NOR 6a to 

NHOS Microprocessor (MPU) with Clock 

Llnoar Quad Bus Transceiver 

TTL Quad 2-Input AND Cat a 

NHOS IK x 4 Static RAM 



Miscellaneous Components 

Ity Re f Ota Description 

51 Moawntary SPOT (Break) 

52 Momentary SPST (Reset) 

53 DPDT Switch (6008 8 RF) 

VI 3.579545 MHz Crystal 

Ql 2N2222A Transistor 

Cherry "Pre" Keyboard (Cherry P/N B70-OSA8) 
or equivalent with Interface cable terminated 
with 24-pin header compatible with Jl 

LI .luH adjustable Inductor 

Tl 75 to 300 Matching Transformer 

P2 Phono plug with compatible RF Interconnect cable 

P3.P4 Phono plugs with compatible audio Interconnect 
cable 

Vastlgal Sideband Filter tuned to pass desired 
channel frequency 

PCS* MlcroChroma 68 Printed Circuit Board (Motorola 
P/N SCPROM02PCB) 

01, 02 IN914 Serial Oiode 



* Included In MICROCHROHA 68 Kits (Motorola P/N SCPROM02PCB) 



•Included in MicroChroma 68 Kits (Motorola P/N SCPR0M02) 



/ 



NIcroChroM 68 Assembly Pert* Lift 



Capacitors 



8ef Des 


VSlUe 


Bef Oes 


Value 


CI 


• IUf 


C30 


. lur 


C2 


• luF 


C31 


• luF 


C3 


.luF 


C32 


tut 


C4 


loour f lev Electrolytic 


: C33 


.luF 


____ C5 


9-J5pF Variable 


mmmm C34 


.luF 


tmmmm C6 


5QpF 


— — 


.luF 


C7 


• luF 


C36 


• iuF 


Cfi 


OluF 


C37 


luF 


.' C9 


.002uF 


^ C38 


.luF 


— » dO 


• IuF 


1 1 1 1 _ _ C39 


. IuF 


. Ill 


nii>c 
•uiur 




liiC 

• lur 


C12 


56oF 


C41 


.luF 


_cn 


.luF 


C42 


.IMF 


C!4 


.OluF 


C43 


.luF 


CIS 


.luF 


C44 


.luF 


C16 


JOOQpF 


C4$ 


.luF 


C17 


.02uF 


C46 


.luF 


CIS 


15O0pF 


C47 


.luF 


C» 


.OluF 


C48 


.luF 


C20 


.luF 


C49 


.luF 


C21 


.luF 


C50 


.luF 


C22 


.luF 


C51 


.luF 


C23 


.luF 


C52 


.luF 


C24 


2700pF 


C53 


.luF 


C25 


lOOOpF 


C54 


.luF 


C26 


.IuF 


C55 


JuF 


C27 


.luF 


C56 


.luF 


C28 


.luF 


C57 


.luF 


C29 


.luF 


. .. CSB 


lOOuF i 16V Electrolytic 



MlcroChroma 68 Assembly Parts Lift (Continued) 



Resistors 


(1/4U) 


Jtef Dcs 


Value (Ohms) 


81 


5k Potentiometer* 


82 


10k Potentiometer* 


83 


S10 


84 


22k 


8S 


3.3k 


86 


15k 


87 


33k 


88 


5.6k 


89 


360 


810 


3.3k 


811 


3.3k 


812 


3.3k 


813 


5.6k 


814 


240 


815 


240 


816 


75 


817 


750 



8ef Oes 


Value (Ohms) 


818 


240 


819 


10k 


820 


100k 


821. 


lk 


822 


2k 


823 


100k 


824 


100k 


825 


100k 


826 


20k 


827 


2k 


828 


100k 


829 


3.3k 


830 


3.3k 


831 


100k 


832 


100k 


833 


100k 


834 


10k 



*1 or 10 turn linear taper 



Motorola Integrated Circuits 

8ef Oes P/N Description 

Ul MC14584B CMOS Hex Schnltt Trigger 
U2 MCI 401 3B CMOS Dual 0 Flip-Flop 

U3 MC6850** NMOS Asynchronous Conaunlcatlons Interface Adaptor (ACIA) 

U4 MC6847** NMOS Video Olsplay fienerator (VDG) 

U5 MC1372** Linear Color TV Video Modulator Circuit 

U6 MC14070B CMOS quad Excluslve-OB Gate 

U7 MC14040B CMOS 12-81 t Binary Counter 

U8 MC1455 Linear Timing Circuit 

U9 MC6820/MC6B21**NM0S Parallel Interface Adapter (PIA) 



"Included In MlcroChroma 68 Kit Motorola P/N SCPR0MO2 



NlcroChrowa it Assawhly Ports List (Continued) 



iof Dos 


»/N 


Description 


U10 


SN74LSOO 


Til. Quad 2-lnput NAHO Site 


(III 


SN74LS04 


TIL Max Invortor 


Ult 


MC140138 


CMOS Dual 0 Flfo-Hoo 


mi 


SN74LSOQ 


TTL Quad 2- Input NANO 6ata 


uu 


SN74LS04 


TIL Max Invartar 


uts 


SM74LSOO 


TTL Quad 2- Input HAHO fiato 


uu 


HC6846P3** 


NNOS MM, I/O, Tlawjr (RIOT) wltH TVB06 1.2 Monitor Program 


017 


MC6887/HC8197 


LtMar Max Throo-Stato tuf fart 


Ult 


MC688tyftCtT97 


Lfnotr Max Thrto~Stato Buffars 


019 


SN74LS138 


TTL 3-to-8 Lint Qacodor 


020 


SN74LS21 


TIL Dual 4- Input ANO fiatt 


021 


HC1400II 


CMOS Quad 2- Input HOR Sit a 


1122 


SN74LS138 


TIL 3-to-a Lin* Oacodar 


02$ 


SN74LS130 


TIL 3-to-8 Lint Oacodar 


024 


SN74LS138 


TIL 3-to-t Lino Oacodar 


U2S 


NC6808** 


NHOS Mlcroprocassor (MPOj with Clock 


U26 


Mcetsytcra 


LfMtr Quad tut Trans ca War 


U2? 


mc6809mc8T2b 


Linear Quad tus Transceiver 


028 


SN74LSQ8 


TTL Quad 2- Input ANO Sat a 


029 


SN74LS08 


TTL Quad 2- Input ANO Gata 



MCM 2114-45 NHOS IK X 4 Static RAMS 

U30 040 050*** 



.031 U41 _051 

U32 Mp**^ 052 

033*** 043 US 3 

" 034 ' 044*" U54 

035*** 04S 0S5 

UU 048 056 

U37 047 057 

U38 _ 048*** : 058 

*U39 049 059#tf|< 



*** Thasa aeenrios aro required for tha alnleul systeei. 



MtcroChroaa €8 Assart!* Parts List (Continued) 



^Wtflt»f°yf ft**™*"** 

Ref Oas Description 

SI Momentary SPOT (Break) 

. S2 Momentary SPST (Reset) 

. S3 OPOT Switch (60dB t Rf ) 

ft 3.S79S4S MMi Crystal 

_ Ql 2N2222A Transistor 

Cherry *PRO" Kayboard (Charry P/N B70-05A8) or equivalent 

with 24 pin haadar compatible with 41 

LI .luH adjustable inductor 

Tl 78 to 300 Matching Trsnsfonaar 
P2 Phono plug vlth compatible RF Interconnect cab la 
_ P3 Phono plug with compatible audio interconnect cibla 

P4 Phono plug with conpatlhlo audio Intarconnact cab la 

Vestlgal Sldaband filter tunad to pass daslrod channa! frequency. 
_PCB**M1creChro*a 88 Prlntad Circuit toard (Motorola P/N SCPR0MQ2PCB) 

01 IN914 Signal oioda 

. 02 IN914 Signal Oioda 

** Includad In MtcroChrom 68 Kit (Motorola P/N SCPR0M02) 



PAGE 001 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

S0001 * 

.0002 NAM TVBUG 

00003 TTL 1.2 A VDG MONITOR FOR 6 800,01,02,03,08 SYST 

00004 * REV 1 

00005 * COPYRIGHT (C) 1978 BY JOHN DUMAS 

00006 * FOR MOTOROLA INC. 

00007 * 

00008 * TVBUG (TM) MOTOROLA 

00009 * 

0001Q * AUSTIN, TEXAS 

00011 * MICROCOMPUTER CAPITAL OF THE WORLD! 

00012 * 

00013 * CURRENT REVISION DATE = NOV 20 1978 

00014 * 

00015 * ALTHOUGH THE INFORMATION CONTAINED HEREIN, 

00016 * AS WELL AS ANY INFORMATION PROVIDED RELATIVE 

00017 * THERETO, HAS BEEN CAREFULLY REVIEWED AND IS 

00018 * BELIEVED ACCURATE, MOTOROLA ASSUMES NO 

00019 * LIABILITY ARISING OUT OF ITS APPLICATION OR 

00020 * USE; NEITHER DOES IT CONVEY ANY LICENSE UNDER 

00021 * ITS PATENT RIGHTS NOR THE RIGHTS OF OTHERS. 

00022 * 

00023 * FOLLOWING ARE TVBUG COMMANDS 

00024 * EACH COMMAND IS 1 LETTER FOLLOWED 

00025 * BY AN OPTIONAL MODIFIER (ADDRESS OR 

00026 * DATA). MODIFIER IS ALWAYS HEX WITH 
""-0027 * LEADING ZERO(S) ASSUMED. MODIFIER 

o0028 * FIELD IS TERMINATED WITH A NON- 
00029 * HEX ENTRY (I.E. SPACE BAR). MODIFIER 

00030 * WILL BE EITHER 2 OR 4 HEX DEPENDING 

00031 * UPON COMMAND MODE. 

00032 * 

00033 * L LOAD K.C. STANDARD TAPE (D2 FORMAT) 

00034 * M MEMORY CHANGE 

00035 * P PUNCH K.C. STANDARD TAPE (D2 FORMAT) 

00036 * R DISPLAY CONTENTS OF TARGET STACK 

00037 * CC B A X P S 

00038 * B PRINT OUT ALL BREAKPOINTS 

00039 * F FILL MEMORY BLOCK 

00040 * C CONTINUE EXECUTION FROM CURRENT LOCATION 

00041 * N NEXT INSTRUCTION TRACE 

00042 * T TRACE 'N' INSTRUCTIONS 

00043 * G GO TO LOCATION »N' 

00044 * D DELETE ALL BREAKPOINTS 

00045 * U UNSET BREAKPOINT WITH ADDRESS *N' 

00046 * E EXAMINE BLOCK OF MEMORY 

00047 * Q QUICK LOAD OF HEX DATA 

00048 * O OFFSET CALCULATION (BRANCH) 

00049 * S SET A BREAKPOINT WITH ADDRESS 'N' 

00050 * V VERIFY KC TAPE (D2 FORMAT) 

00051 * Z CLEAR TV SCREEN 

410052 * ! USER FUNCTION #1 (SHIFT 1) 

JD053 * " USER FUNCTION #2 (SHIFT 2) 

t)0054 * # USER FUNCTION #3 (SHIFT 3) 



PAGE 002 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

00056 * 

00057 OPT • S,0,CREF 

00058 003F A SWI EQU $3F SWI OP CODE 

00059 * 

00060 D000 A VDGRAM EQU $D000 

00061 * 

00062 * PIA FOR D2 HEX KEYBOARD & DISPLAY 

00063 * (USED IF D2 KIT IS RETROFITTED) 

00064 F420 A KEYAD EQU $F420 

00065 F421 A KEYAC EQU KEYAD +1 

00066 F422 A KEYBD EQU KEYAD +2 

00067 F423 A KEYBC EQU KEYAD +3 

00068 * 

00069 * PIA FOR VDG & ASCII KEYBRD 

00070 * 

00071 F404 A PI A AD EQU $F404 

00072 F405 A PIAAC EQU PIAAD+1 

00073 F406 A PIABD EQU PIAAD+2 

00074 F407 A PIABC EQU PIAAD+3 

00075 * 

000 76 * ACIA FOR KC STANDARD TAPE INTERFACE 

00077 * 

00078 F408 A ACIAS EQU $F408 

00079 F409 A AC IAD EQU ACIAS+1 



58 B' z 



PAGE 003 TVBUG46 .SA:0 TVBOG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



^0081 










* 








JO 82 










* 








00083A 


F800 










ORG 


$F800 




00084 






F800 


A 


BASORG 


EQD 


* 


BASE ORIGIN 


00085 










* 








00086 










* JUMP 


TABLE 


TO MONITOR 


00087 










* 








00088A 


F800 


7E 


FEE1 


A 




JMP 


INCH1 


INPUT CHAR 


00089A 


F803 


7E 


FF0F 


A 




JMP 


OUTCH1 


OUTPUT CHAR 


00090A 


F806 


7E 


F995 


A 




JMP 


PDATA1 


OUTPUT STRING 


00091A 


F809 


7E 


F929 


A 




JMP 


BADDR 


INPUT HEX 


00092A 


F80C 


7E 


FFC9 


A 




JMP 


SCROLL 


UP 1 LINE 


00093A 


F80F 


7E 


F9B0 


A 




JMP 


OUT4HS 


OUTPUT 4 HEX+ SPACE 


00094A 


F812 


7E 


F9B2 


A 




JMP 


OUT2HS 


OUTPUT 2 HEX+SPACE 


00095A 


F815 


7E 


FFA8 


A 




JMP 


INIT 


CLEAR SCREEN 


00096A 


F818 


7E 


F96C 


A 




JMP 


GET ADR 


GET START & STOP ADR 


00097A 


F81B 


7E 


FF7F 


A 




JMP 


SAVE 


SAVE AREG 0,X 


00098A 


F81E 


7E 


FE86 


A 




JMP 


SYNCLD 


LOAD AREG 0,X 


00099A 


F821 


7E 


FB20 


A 




JMP 


CONTRL 


RESTART POINT 


00100 










* 








00101 










* 


I/O INTERRUPT SEQUENCE 


00102 










* 








00103A 


F824 


FE 


F37A 


A 


IO 


LDX 


IOV 




00104A 


F827 


6E 


00 


A 




JMP 


X 




00105 










* 








00106 










* 


NMI SEQUENCE 




■^0107 










* 








J108A 


F829 


FE 


F380 


A 


POWDWN 


LDX 


NIO 


GET NMI VECTOR 


001 09A 


F82C 


6E 


00 


A 




JMP 


X 




00110 










* 








00111 










* 


SWI INTERRUPT SEQUENCE 


00112 










* 








00113A 


F82E 


FE 


F384 


A 


SFEI 


LDX 


SWI1 




00114A 


F831 


6E 


00 


A 




JMP 


X 





5S> 



PAGE 004 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00116 








* 








00117 








* JUMP 


TABLE 


TO ROUTINES PERFORMING TVBUG FCTN'S 


00118 
















00119 




F833 


A 


FCTABL 


EQO 


* 




00120 








* 








00121A 


F833 


21 


A 




FCC 


/!/ 




00122A 


F834 


F396 


A 




FDB 


USR1 


GO USER #1 


00123A 


F836 


22 


A 




FCC 


/"/ 




00124A 


F837 


F399 


A 




FDB 


USR2 


GO USER #2 


00125A 


F839 


23 


A 




FCC 


/#/ 




00126A 


F83A 


F39C 


A 




FDB 


USR3 


GO USER #3 


00127A 


F83C 


42 


A 




FCC 


/B/ 


"B" - PRINT ALL BREAKS 


00128A 


F83D 


FB52 


A 




FDB 


PNTBRK 




00129A 


F83F 


43 


A 




FCC 


/c/ 


"C" - CONTINUE 


00130A 


F840 


FB90 


A 




FDB 


CONT 




00131A 


F842 


44 


A 




FCC 


/D/ 


"D" - DELETE ALL BREAKS 


00132A 


F843 


FB47 


A 




FDB 


DELBRK 




00133A 


F845 


47 


A 




FCC 


/G/ 


"G" - GO TO ENTERED ADDRESS 


00134A 


F846 


FB61 


A 




FDB 


GOTO 




00135A 


F848 


4C 


A 




FCC 


/L/ 


"L" - LOAD 


00136A 


F849 


F9C0 


A 




FDB 


LOAD 




00137A 


F84B 


4D 


A 




FCC 


/M/ 


"M" - MEMORY CHANGE 


00138A 


F84C 


FA29 


A 




FDB 


CHANGE 




00139A 


F84E 


4E 


A 




FCC 


/N/ 


"N" - NEXT (TRACE 1 INSTR) 


00140A 


F84F 


FB73 


A 




FDB 


NEXT 




00141A 


F851 


50 


A 




FCC 


/P/ 


"P" - PUNCH 


00142A 


F852 


FC35 


A 




FDB 


PUNCH 




00143A 


F854 


52 


A 




FCC 


/ R/ 


"R" - PRINT STACK 


001 44A 


F855 


FB98 


A 




FDB 


PSTAK1 




00145A 


F857 


54 


A 




FCC 


/T/ 


"T" - TRACE N INSTRUCTIONS 


00146A 


F858 


FB8C 


A 




FDB 


TRACE 




00147A 


F85A 


55 


A 




FCC 


/u/ 


"U" - RESET A BREAKPOINT 


00148A 


F85B 


FB4D 


A 




FDB 


RSTBRK 




00149A 


F85D 


53 


A 




FCC 


/s/ 


"S" - SET A BREAKPOINT 


00150A 


F85E 


FB59 


A 




FDB 


SETBRK 




00151A 


F860 


4F 


A 




FCC 


lot 


OFFSET CALCULATION 


00152A 


F861 


FA9D 


A 




FDB 


OFFSET 




00153A 


F863 


51 


.A 




FCC 


/Q/ 


QUICK LOAD 


00154A 


F864 


F8FE 


A 




FDB 


FASTLD 




00155A 


F866 


45 


A 




FCC 


/E/ 


EXAMINE BLOCK 


00156A 


F867 


F88F 


A 




FDB 


DISPLY 




00157A 


F869 


46 


A 




FCC 


/F/ 




00158A 


F86A 


F8E3 


A 




FDB 


FILL 


FILL BLOCK 


00159A 


F86C 


56 


A 




FCC 


/V/ 


VERIFY K.C. STANDARD TAPE 


00160A 


F86D 


F9B9 


A 




FDB 


VERIFY 




00161A 


F86F 


5A 


A 




FCC 


lit 


CLEAR SCREEN 


00162A 


F870 


F923 


A 




FDB 


ZSCR 




00163 




F872 


A 


FCTBEN 


EQU 


* 





PAGE 005 TVBUG46 .SA:0 TVBUG 1.2 A YDG MONITOR FOR 6800,01,02,03,08 SYSTEM 
%0165 ********** 

J)166 * INITIALIZATION/RESET CODE 

00167 * THIS DATA IS COPIED 



00168 










* INTO 


RAM 


DURING START-UP INITALIZATION 


00169 










* 








00170 






F872 


A 


ADRSTR 


EQO 


* 




00171A 


F872 




F36F 


A 




FDB 


STACK 


INIT FOR "SP" 


00172A 


F874 




FCE2 


A 




FDB 


SWI1S 


INIT FOR "SWIl" 


00173A 


F876 




FD0C 


A 




FDB 


BRKINH 


INIT FOR "SWI2" 


00174 










* 








00175A 


F878 


20 


03 F87D 




BRA 


BRG 


"BRA" INST IS REPLACED 


00176A 


F87A 


7E 


FD4A 


A 




JMP 


BRNOGO 


COND BRA INST IN ROUT. 


00177A 


F87D 


7E 


FD4E 


A 


BRG 


JMP 


BRGO 


WHICH DETERMINES IF 


00178 










* 






BRA IS GO/NOGO 


00179A 


F880 


39 








RTS 






00180A 


F881 


39 








RTS 






00181A 


F882 


39 








RTS 






00182A 


F883 


39 








RTS 






00183A 


F884 


39 








RTS 






00184A 


F885 


39 








RTS 






00185A 


F886 


7E 


FB20 


A 




JMP 


CONTRL 




00186A 


F889 


7E 


FB20 


A 




JMP 


CONTRL 




00187A 


F88C 


7E 


FB20 


A 




JMP 


CONTRL 





PAGE 006 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00189 








********** 






00190 








* EXAMINE BLOCK OF MEMORY 


00191 








* ACSII EQUIV 


PRINTED 


BENEATH 


00192 








* HEX BYTE 






00193 








* FROM START ADR TO 


STOP ADR 


00194 








* FORMAT : 






00195 








* AAA A DDI DD2 






00196 








* AC1 AC2 






00197 








* 






00198 








* AAAA= ADDRESS 


,DD=HEX ! 


DATA 


00199" 








* AC=ASCII CHAR (IF PRINTABLE) 


00200 








********** 






00201A 


F88F 


BD 


F96C A 


DISPLY JSR 


GETADR 




00202 








* 






00203A 


F892 


BD 


F99C A 


NEWLIN JSR 


PCRLF 




00204A 


F895 


CE 


F37C A 


LDX 


#BEGA 


PRINT ADDRESS 


00205A 


F898 


BD 


F9B0 A 


JSR 


OUT4HS 




00206 








* 






002 07A 


F89B 


FE 


F37C A 


LDX 


BEGA 


SET FOR 8 /LINE 


00208A 


F89E 


C6 


08 A 


LDAB 


#8 




00209 








* 






00210A 


F8A0 


BC 


F37E A 


OUT DAT CPX 


ENDA 


MAIN LOOP 


00211A 


F8A3 


27 


06 F8AB 


BEQ 


ASCII 




00212A 


F8A5 


BD 


F9B2 A 


JSR 


OUT2HS 


PRINT HEX BYTE 


00213A 


F8A8 


5A 




DECB 






00214A 


F8A9 


26 


F5 F8A0 


BNE 


OUTDAT 




00215 








* 






00216 








* NOW DO ASCII 




00217 








* 






00218A 


F8AB 


BD 


F99C A 


ASCII JSR 


PCRLF 




00219A 


F8AE 


8D 


26 F8D6 


BSR 


OUT5S 


SKIP ADDRESS 


00220A 


F8B0 


FE 


F37C A 


LDX 


BEGA 




00221A 


F8B3 


C6 


08 A 


LDAB 


#8 




00222 








* 






00223A 


F8B5 


A6 


00 A 


NEWCHR LDAA 


0,X 




00224A 


F8B7 


81 


IF A 


CMPA 


#$1F 




00225A 


F8B9 


2F 


04 F8BF 


BLE 


OUTPRD 




00226A 


F8BB 


81 


60 A 


CMPA 


#$60 




00227A 


F8BD 


2D 


02 F8C1 


BLT 


OUTASC 




00228A 


F8BF 


86 


2E A 


OUTPRD LDAA 


# ' . 




00229A 


F8C1 


8D 


ID F8E0 


ODTASC BSR 


OUCH 4 




00230A 


F8C3 


08 




INX 






00231A 


F8C4 


BC 


F37E A 


CPX 


ENDA 




00232A 


F8C7 


27 


5D F926 


BEQ 


C3 




00233 








* 






00234A 


F8C9 


8D 


11 F8DC 


MORE BSR 


OUT2S 




00235A 


F8CB 


5A 




DECB 






00236A 


F8CC 


26 


E7 F8B5 


BNE 


NEWCHR 




00237A 


F8CE 


FF 


F37C A 


STX 


BEGA 




00238A 


F8D1 


BD 


FEE1 A 


JSR 


INC HI 




00239A 


F8D4 


20 


BC F892 


BRA 


NEWLIN 





PAGE 007 TVBUG46 .SA:0 TVBOG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



$0241 








* 






y ] 02 42A 


F8D6 


8D 


06 F8DE 


OUT5S 


BSR 


OUT1S 


00243A 


F8D8 


8D 


04 F8DE 




BSR 


OUT1S 


00244A 


F8DA 


8D 


02 F8DE 




BSR 


OUT IS 


00245A 


F8DC 


8D 


00 F8DE 


OUT2S 


BSR 


ODT1S 


00246A 


F8DE 


86 


20 A 


OUT IS 


LDAA 




00247A 


F8E0 


7E 


FFOF A 


OUCH4 


JMP 


OOTCH1 



63 



PAGE 008 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00249 * 

00250 ********** 

00251 * FILL MEMORY BLOCK WITH KONSTANT 

00252 ********** 

00253 * 



00254A 


F8E3 


BD 


F96C A 


FILL 


JSR 


GETADR 


00255A 


F8E6 


CE 


FE63 A 




LDX 


fFILLMS 


00256A 


F8E9 


BD 


F995 A 




JSR 


PDATA1 


00257A 


F8EC 


8D 


3B F929 




BSR 


BADDR 


0025l8A 


F8EE 


B6 


F3CF A 




LDAA 


XLOW 


002 5 9 A 


F8F1 


FE 


F37C A 




LDX 


BEGA 


00260 








* 






00261A 


F8F4 


BC 


F37E A 


FILL0 


CPX 


ENDA 


00262A 


F8F7 


27 


2D F926 




BEQ 


C3 


00263A 


F8F9 


A7 


00 A 




STAA 


0,X 


00264A 


F8FB 


08 






INX 




00265A 


F8FC 


20 


F6 F8F4 




BRA 


FILL0 



B-B 



PAGE 009 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00267 

•>268 

-6269 

00270 

00271 

00272A 

00273 

00274A 

00275A 

00276A 

00277 

00278A 

00279 

00280A 

00281A 

00282A 

00283A 

00284A 

00285A 

00286A 

00287A 

00288A 

00289A 

00290A 

00291 

00292 

00293 

*^2 94A 

<r02 95A 



* QUICK LOAD PRINTS ADDRESS ONCE 

* PER LINE THEN ACCEPTS 8 HEX BYTES 

* OF CODE & STORES IN MEMORY 
* 



F8FE 8D 6C F96C FASTLD BSR 



F900 BD F99C 
F903 CE F37C 
F906 BD F9B0 

F909 C6 08 



A FAST0 

A 

A 

* 

A 



F90B 8D 1C F92 9 FASTI 
F90D FE F37C A 
F910 B6 F3CF A 
F913 A7 00 A 
F915 08 

F916 FF F37C A 
F919 BC F37E A 
F91C 27 08 F92 6 
F91E 5A 

F91F 26 EA F90B 
F921 20 DD F900 

* 



F923 BD FFA8 
F926 7E FB20 



A ZSCR 
A C3 



JSR 
LDX 
JSR 

LDAB 

BSR 

LDX 

LDAA 

STAA 

INX 

STX 

CPX 

BEQ 

DECB 

BNE 

BRA 



JSR 
JMP 



GETADR 

PCRLF 
#BEGA 
OUT4HS 

#8 

BADDR 
BEGA 
XLOW 
0,X 

BEGA 
ENDA 
C3 

FASTI 
FAST0 



IN IT 
CONTRL 



PRINT ADDR 



GET BYTE & 
SAVE IT 



8-9 



PAGE 010 TVBUG46 .SA:0 TVBUG 1.2. A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00297 

00298 

00299 

00300 

00301 

00302 

00303 

00304 

00305 

00306 

00307 

00308A 

00309A 

0031 OA 

00311A 

00312A 

00313A 

00314A 

00315A 

00316A 

00317 

00318 

00319 

00320A 

00321A 

00322A 

00323A 

00324A 

00325A 

00326A 

00327A 

00328A 

00329 

00330A 

00331A 

00332A 

00333A 

00334A 

00335A 

00336A 

00337A 

00338A 

00339A 

00340A 

00341 

00342A 

00343A 

00344A 

00345A 

00346A 



********** 



F929 7F F3C8 
F92C 7F F3C9 
F92F 37 
F930 36 
F931 86 FF 
F933 B7 F3D2 
F936 BD FEE1 
F939 7C F3D2 
F93C B7 F3D3 



F93F 
F941 
F943 
F945 
F947 
F949 
F94B 
F94D 
F94F 

F951 
F952 
F953 
F954 
F955 
F957 
F958 
F95B 
F95E 
F95F 
F961 



80 30 A 
2B 20 F963 

81 09 A 
2F OA F951 
-81 11 A 
2B 18 F963 
81 16 A 
2E 14 F963 
80 07 



r 



48 
48 
48 
48 
C6 
48 
79 
79 
5A 
26 
20 



BUILD ADDRESS 
A,B UNCHANGED 

INPUT HEX CHARS UNTIL NON-HEX 

ENTERED THEN EXIT 
COUNT # OF CHAR ENTERED 

SAVE COUNT IN CHRCNT 
STORE TERMINATION CHAR 

IN TERMCH 



ON EXIT X 
********** 

BADDR CLR 



= (XHI) = (TEMP 2 ) 



TEMP 2 



A 


CLR 

PSHB 

PSHA 


TEMP 2+1 




A 


LDAA 


#$FF 


ZERO CHARACTER 


A 


STAA 


CHRCNT 


COUNTER 


A BAD0 


JSR 


INC HI 


1 CHAR IN 


A 


INC 


CHRCNT 


BUMP CHAR CNT 


A 


STAA 


TERMCH 


SAVE TERMINATION 



* CHECK FOR 
* 

SUBA 

BMI 

CMPA 

BLE 

CMPA 

BMI 
CMPA 
BGT 
SUBA 



BAD 3 



04 

F3C9 
F3C8 



BAD! 



A 
A 



F6 
D3 



F957 
F936 



F963 FE F3C8 
F966 FF F3CE 
F969 32 
F96A 33 
F96B 39 



* 

A BAD 2 
A 



ASLA 

ASLA 

ASLA 

ASLA 

LDAB 

ASLA 

ROL 

ROL 

DECB 

BNE 

BRA 

LDX 

STX 

PULA 

PULB 

RTS 



VALID HEX 

#$30 
BAD 2 
#9 

BAD3 
#$11 
BAD 2 
#$16 
BAD 2 
#7 

GOOD HEX 



#4 

TEMP2+1 
TEMP 2 

BAD1 
BAD0 

TEMP2 
XHI 



£-10 



PAGE Oil TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

.349 *********** 

ljb350 * GET ADDRESS. .SEND PROMPT 

00351 * FOR BEGIN & END ADDRESSES 

00352 * STORES IN BEGA & ENDA 

00353 * ON EXIT A=$D,B=0,X=(ENDA) 

00354 * 



00355 






********** 




00356A 


F96C 


CE 


FE27 A GET ADR 


LDX 


#MCL4 


00357A 


F96F 


8D 


24 F995 


BSR 


PDATA1 


00358A 


F971 


8D 


B6 F929 


BSR 


BADDR 


00359A 


F973 


FF 


F37C A 


STX 


BEGA 


00360 






* 






00361A 


F976 


CE 


FE32 A 


LDX 


#MCL5 


00362A 


F979 


8D 


1A F995 


BSR 


PDATA1 


00363A 


F97B 


8D 


AC F929 


BSR 


BADDR 


00364A 


F97D 


08 




INX 




00365A 


F97E 


FF 


F37E A 


STX 


ENDA 


00366A 


F981 


39 




RTS 





PAGE 012 TVBUG46 .SA:0 TVBUG 1. 2 A VDG MONITOR FOR 6800 , 01, 02 , 03 , 08 SYSTEM 



00369 ********** 

00370 * OUTPUTS LEFT SIDE OF 

00371 * BYTE AS ASCII HEX CHAR 

00372 * ACCA IS KLOBBERED! 

00373 ********** 

00374A F982 44 OUTHL LSRA OUT HEX LEFT BCD DIGIT 

00375A F983 44 LSRA 
00376A F984 44 LSRA 
00377A F985 44 LSRA 

00378 *********** 

00379- . * OUTPUTS RIGHT SIDE AS ASCII HEX 

00380 * KLOBBERS ACCA 

00381 ********** 



00384A F986 84 OF 



A OUTHR ANDA 



00385A F988 8B 30 A 
00386A F98A 81 39 A 
00387A F98C 23 28 F9B6 
00388A F98E 8B 07 A 
00389A F990 20 24 F9B6 

00391 
00392 
00393 
00394 
003 95 

00396 ^ 
00397 

00398A F992 8D 
003 9 9A F994 08 
00400A F995 A6 
00401A F997 81 
00402A F999 26 F7 F992 
00403A F99B 39 



ADDA 

CMPA 

BLS 

ADDA 

BRA 



#$F 

#$30 

#$3 9 

OUTCH 

#$7 

OUTCH 



OUT HEX RIGHT BCD DIGIT 



* 
* 
* 

********** 

* PRINT DATA POINTED AT BY X-REG 

^ * ON EXIT A=4 , B=UNCHANGED, X POINTS AT EOT 
********** 

22 F9B6 PDATA2 BSR OUTCH 
I NX 

00 A PDATAl LDAA X 

04 A CMPA #4 

BNE PDATA2 
RTS 



STOP ON EOT 



PAGE 013 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00405 

"»406 

J6407 

00408 

00409A 

00410A 

00411A 

00412A 

00413A 

00414 

00415 

00416" 

00417 

00418 

00419 

00420A 

00421A 

00422A 

00423A 

00424A 



********** 

* PRINT CR LP 

* ACCA IS KLOBBERED! 
********** 

F99C FF F3CE A PCRLF STX XHI 

F99F 86 0D A LDAA #$D 

F9A1 8D 13 F9B6 BSR OUTCH 

F9A3 FE F3CE A LDX XHI 

F9A6 39 RTS 



********** 

* ON EXIT X=X+1 

* BYTE IS PRINTED AS 2 HEX CHARACTERS 



F9A7 A6 00 A OUT2H LDAA 

F9A9 8D D7 F982 BSR 

F9AB A6 00 A LDAA 

F9AD 08 INX 

F9AE 20 D6 F986 BRA 



0,X OUTPUT 2 HEX CHAR 

OUTHL OUT LEFT HEX CHAR 

0,X PICK UP BYTE AGAIN 

OUTHR OUTPUT RIGHT HEX CHAR AND RTS 



00426 * 

00427 * 

00428 * 

00429A F9B0 8D F5 F9A7 OUT 4HS BSR 
00430A F9B2 8D F3 F9A7 OUT2HS BSR 
00431A F9B4 86 20 A OUTS LDAA 
m ^432A F9B6 7E FF0F A OUTCH JMP 
0*0433 * 



OUT2H OUTPUT 4 HEX CHAR + 

OUT2H OUTPUT 2 HEX CHAR + 

#$20 SPACE 

OUTCH1 (BSR & RTS) 



SPACE 
SPACE 



PAGE 014 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00435 








********** 






00436 

\J \J *T J \J 








* VERIFY SET 

V Jul IVXC JL • iuLiX 


1 VERIFY 


FLAG 


00437 








* THEN GO TO 


LOAD 




o o a ^ a 

U Uft j O 








************ 






004 3 9 A 




8 6 


01 A 


vfptfy r.naa 

VJCiJt\XJy X JLl4-/riri 


if x 




00440A 


F9BB 


B7 


F3D4 A 


STAA 


VFLAG 




Uult Xri 


r 7 jdjcj 


?0 


0 3 FQP3 




LOADO 




0044? 








* 






00443 








* 






0 0444 

V/ V 1 *X ** 








********** 






0 0 44 








*L0AD MEMORY 


FROM KC 


STANDARD 


00446- 








* TAPE.. 






00447 

U \J t *± 1 








* BEFORE BLOCK OF DATA STARTS 


O AA A Q 








* ALL BYTES 


(EXCEPT 


RUBOUT ) 


0044Q 
1/ v *x *x .7 








* ARE PRINTED AS ASCII CHARS 


004 *v0 

U U ft D U 








* THIS WILL DISPLAY FILE TITLE 


UUffc Dx 








* IF ANY 






004 








* AFTER BLOCK BEGINS 


EACH 


OO A c; "3 








* BLOCK READ 


WILL PRINT A 'B' ON TV 


00 A 5A 
UUftOft 








********** 






004 5 5 






F Q r* 0 71 


LOAD EQU 


* 




O 04 R£71 


OQpA 


IE 


E OU ft A 


CLR 


VFLAG 




0 0 A K 1 
U U ft D / 








* 






004 t^Pa 
U U ft J Oil 






r EiD±> A 


LOADO LDX 


#0FSET 




AA A E Q TV 

UUftDzJA 


X? 


On 

ojD 


#^ir% rri Q AC 


BSR 


PDATA1 




A A A £ A 7A 

UU40UA 


rs A ■/■» A 


JdjU 


B 'QO Q 7A 

r y ^ i7 A 


JSR 


BADDR 




00461 A 

U U*x O Xri 


r -? wo 


FF 


f 3D 5 7i 

£ OL/ D ri 


STX 


OFF ADR 




AAA £9 
U U ft O Z 








* 






A A A £ "3 71 
U U ft O *3 A 


T? Q r 1 !? 
r j\~ej 


OO 


1 n 7i 

X U yA 


LDAA 


#$10 


DIV BY 1 


00464A 


F9DQ 


B7 


F 408 A 
j. *t v o rx 


STAA 


ACIAS 




004 6 5 A 
uuiu Jri 


E y U O 


1 6 




BILD TAB 






o a a £ £ 71 

U Uft 0 OA 


XP Q r\ A 
r y U *± 


On 
OJJ 


op tr> 71 AT? 


BSR 


KCIN 




004 67A 
UUft O / ri 


r -7JJD 


Zjd 


ED E -7 U J 


BMI 


BILD 




A AA£Q71 
U Uft O on 


wans 


on 
OJJ 


Uv# r -/ ISO 


BSR 


0UTCH 












* 






0 04 70 A 
U Uft / UA 


i?QnA 


pi 

v*x 


FF 71 
EE ri 


CMPB 


#$FF 




UUfl /1A 


r jU\~ 


0 £ 
Z 0 


r D r 7Uj 


BNE 


BILD 




00472A 


F9DE 


81 


42 A 


CMPA 


#'B 


FIND BEGIN 


00473A 


F9E0 


27 


06 F9E8 


BEQ 


RDBLCK 




00474A 


F9E2 


81 


47 A 


CMPA 


#'G 


FIND END 


00475A 


F9E4 


26 


ED F9D3 


BNE 


BILD 




00476A 


F9E6 


20 


7D FA65 


BRA 


C5 





PAGE 015 TVBOG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

00478 * 
^479 * 



m A ft 0 A 

*± Own 




8D 

\JLJ 


24 FA0F 


RDRLCK 








ooa ft 1 a 

UUtO Xrl 


PQPA 








TAR 






o 04 ft 9 a 


r -7 iljd 


Rp 






TMPD 
XLNv^JD 






00483A 


F9EC 


8D 


20 FAOE 




BSR 


KCIN 


START ADDR 


00484A 


P9EE 


B7 


F37P A 




STAA 


BEGA 




004ft5 A 


£ ? ri 


ftn 


Id FAOP 
ID r nU£j 




ID OJa 


TCP TNT 

£\V*» -LIN 




00486A 


P9P3 


B7 


F37D A 




STAA 


BEGA+1 

U Ami VJXi ' ^ 




004ft7A 

U U ft O / ri 


r -7 r u 


pp 


P ^ 7P A 




JUL/ 




TO Y 


U U f* o OA 


r .7 r n 


ftn 


70 T?AfiR 




DCD 

JDOJa 


Annnpp 




00489- 








* 








004 QO A 


PQ PR 


ftn 


1 1 PA OP 


O ID jUV*»I\ 


DOX\ 


KPTN 

IW*, X1N 




OO A Q1 2V 


i?q i?n 


7n 


r JU ft A 






\71? TIC 




004 Q9 A 


PA 00 


^ o 


0 9 7 A 04 




a vitU 






00493A 


FA02 


A7 


00 A 




STAA 


o,x 




00494A 


FA04 


Al 


00 A 


LOAD1 


CMPA 


o,x 




00495A 


FA06 


26 


58 FA60 




BNE 


LOAD 19 




00496A 


FA08 


08 






INX 






00497A 


FA09 


5A 






DECB 




BYTE COUNT 


00498A 


FA OA 


26 


EF F9FB 




BNE 


STBLCK 




00499A 


FAOC 


20 


C5 F9D3 




BRA 


BILD 





7/ 13- 1^ 



PAGE 016 TVBUG46 .SA:0 TVBDG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

00501 * 

00502 * 1 CHAR IN FROM TAPE 

00503 * 

00504A FADE 8D OA FA1A KCIN BSR CHKESC 
00505A FA10 B6 F408 A LDAA ACIAS 

00506A FA13 47 ASRA 
00507A FA14 24 F8 FAOE BCC KCIN 

00508A FA16 B6 F409 A LDAA AC IAD 

00509A FA19 3 9 RTS 

00510 * 

00511 * CHECK FOR ESCAPE KEY 
00512- * 

00513 * 



00514 










* 






00515A 


FA1A 


36 






CHKESC 


PSHA 




00516A 


FA1B 


B6 


F404 


A 




LDAA 


PIAAD 


00517A 


FA1E 


84 


7F 


A 




ANDA 


#$7F 


00518A 


FA20 


81 


IB 


A 




CMPA 


#$1B 


00519A 


FA22 


26 


03 FA27 




BNE 


CHK1 


00 52 OA 


FA24 


7E 


FAF3 


A 




JMP 


ESC1 


00521A 


FA27 


32 






CHK1 


PULA 




00522A 


FA28 


39 








RTS 





00523 



72. 



PAGE 017 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



A AC O C 








* 








W 52 6 








* CHANGE MEMORY (M AAAA DD NN) 


I h c o *7 








* 








UUdzoA 


nil 


BD 


TO A A Q TV 

Fy 2 y a 


PU» VTOTO 


JSR 


TO TV TO>rVT> 


nnTT n k r^rvo t? c o 
rJUlliU AJJUKboo 


n n c o q a 
UUDZ yA 


t? a Or* 
c AZU 


TO TO 
DU 


r y a 


ntrr« A 

UiivaU 


TO "D 


O/-ITOT TO 


OT*A Dm VTITTaT T TXTT? 


AAC-J A* 

U UOJ UA 


TP A Of 

r AZr 


r*x? 

U£i 


to OC*XP A 




LtU A 


ffAnl 


Ct rt\±vi± AUUs\ 




I? 7A *5 O 
£ A JZ 


nn 
DU 


riQD A TV 

r y JdU a 




JbK 


/-vnrn AUC 

UU1 ft no 




AAC 

UUj JZ 
















AACOOa 

UUDo JA 


1? A O C 

r A J 3 


I? V 
E Cj 


to *3/-» to tv 




T n y 

JuJJ A 


Anl 


irKXJN 1 UljiJ 


AAC O yf 7\ 


r Aoo 


dli 


to a to A A 

r jdZ A 




JOK 


vju x zno 


L,vJIN IJCjIN 1 o 


uuooda 


7V Til 

FAJB 


uy 






TO TO V 

DEX 






UU D O O 








* 








A A C O "7 A 

UU5 3 7A 


FA JC 


BD 


TO A A A TV 

Fy 2 y A 




TO "D 

JbK 


dAUUK 




AACOQTl 

UUd JoA 


TO TV OTO 

FA JF 


TO TO 

FE 


TO O/"* A A 

FJCA A 




T TO V 

LDX 


SAVEX 


GOT NEW 


U Ujj y 








* 








A AC yi An 

UU54UA 


TO TV ^ O 

FA4Z 


/D 


TO OT"\ A TV 

FJD2 A 




mom 


/-% TTTO/ - ! XTm 

CHRCNT 


NEW DATA?? 


a ac yl 1 tv 

U0541A 


to tv vl C 

FA45 


A *7 

2 7 


A A TO A C A 

0 9 FA50 




BEQ 


SKPSTR 


NO! SKIP LOAD 


A A C yl O A 

U U04ZA 


U» 7V A "7 

r A4 / 


TO /T 

B 0 


to ^r*x? a 
F JCr A 




T T> A A 


VT A~VT*7 

XLOW 


Ktr\ onm txt 
NO PUT IN 


00543A 


FA4A 


A7 


00 A 




o m A A 

STAA 


A V 
0 / X 


XT TOTVT TO TV m A C 

NEW DATA & 


Aft C A An 

00544A 


FA4C 


Al 


A A n 

00 A 




CMPA 


0 f X 


CHECK 


UU54 5A 


TO TV A XT* 

FA4E 


a £ 

ZD 


1 A to A C A 

10 FAoO 




BNE 


T AH rv 1 A 

LOADiy 


to TV to r\Ti t m 

BAD. # QUIT 


A A C A C 

00546 
















AAC A *7 TV 

0054 7 A 


FA50 


Bo 


F3D3 A 


SKPSTR 


LDAA 


TERMCH 


GOOD ST 


AAC/ 

U Uj ft OA 


T? 7A C *3 


u o 






± JN A 




XT'!? xr*V *P 
INCiAl i 


AACyl Q A 

U U54 yA 


T? TV C A 

FA54 


Q 1 


A A A 

UA A 




LMrA 


if 9 UA 


TT? T T? VT? o 


AAC C A A 

UU550A 


TO TV C C 

FA5o 


O "7 

27 


TO Vl TO A AA"* 

D4 FA2C 




BEQ 


CHG0 


NEXT ADDR 


UUDD1 








* 








\a C C O a 

05 52A 


FA5S 


ol 


C TO TV 

5E A 








TT? T7T3 ATDTD^MaT — rM?/^ TDT?M T?"K7m 

lr UF AKKUW — Dr*UKr*MriN 1 


<J 0553A 


TO TV C TV 

FA5A 


A ^ 

26 


A A TO A C C 

0 9 FAo o 




BNE 


C5 




AACC/A 

UU D34A 


r AX 


uy 






DEX 






00555A 


FA5D 


09 






DEX 






00556A 


FA5E 


20 


CC FA2C 




BRA 


CHG0 


LAST ADDR 


005 5 7A 


FA60 


CE 


FE3C A 


LOAD 19 


LDX 


#NCHG 




00558A 


FA63 


8D 


6F FAD 4 




BSR 


PD2 




00559A 


FA65 


7E 


FB20 A 


C5 


JMP 


CONTRL 




00560A 


FA68 


7E 


FF0F A 


0UTCH5 


JMP 


OUTCH1 




73 










8-17 





PAGE 018 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00562 










********** 




00563 










* 


ADD OFFSET 


TO VALUE 


r\ r\ t? f A 

00564 










* 


A & B UNCHANGED 


00565 










* 


OFFSET IS 


IN B,A 


00566 










********** 




00567A 


PA6B 


36 






ADDOFF PS HA 




00568A 


PA6C 


37 








PSHB 




00569A 


FA6D 


FF 


F3C8 


A 




STX 


TEMP2 


A A t "J A 

00570 
















00571A 


FA70 


P6 


F3C8 


A 




LDAB 


TEMP 2 


00572A 


FA73 


B6 


F3C9 


A 




LDAA 


TEMP2+1 


A A C T2u 

00 5 73 A 


FA76 


BB 


F3D 6 


A 




ADDA 


OFFADR+1 


00574A 


FA79 


F9 


F3D5 


A 




ADCB 


OFF ADR 


00575A 


FA7C 


F7 


F3C8 


A 




STAB 


TEMP 2 


00576A 


FA7F 


B7 


F3C9 


A 




STAA 


TEMP 2+1 


00577 










* 






00578A 


FA82 


FE 


F3C8 


A 




LDX 


TEMP 2 


00579A 


FA85 


33 








PULB 




00580A 


FA86 


32 








PULA 




00581A 


FA87 


39 








RTS 





PAGE 019 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

00583 * 

*H0584 * NMI ENTRY 

>)585 * 



00586A 


FA88 


BF 


F382 


A NMI . 


STS 


SP 


00587A 


FA8B 


BD 


F99C 


A 


JSR 


PCRLF 


00588A 


FA8E 


86 


42 


A 


LDAA 


# 1 B 


00589A 


FA90 


8D 


D6 FA68 


BSR 


OUTCH5 


00590A 


FA92 


BD 


F9B4 


A 


JSR 


OUTS 


00591A 


FA95 


86 


02 


A 


LDAA 


#2 


00592A 


FA97 


BD 


FBA6 


A 


JSR 


BRKSUB 


00593A 


FA9A 


7E 


FB98 


A 


JMP 


PSTAK1 



75 



PAGE 020 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00595 










* 








00596 










* 


OFFSET CALCULATES BRANCH 


00597 










* 








00598A 


FA9D 


BD 


F96C 


A 


OFFSET JSR 


GETADR 




005 9 9A 


FAAO 


CE 


FE51 


A 




LDX 


#OFSET 




00600A 


FAA3 


8D 


2F FAD 4 




BSR 


PD2 


SEND MESSAGE 


00601 










* 








00602A 


FAA5 


B6 


F37F 


A 




LDAA 


ENDA+1 


CALCULATE 


00603A 


FAA8 


F6 


F37E 


A 




LDAB 


ENDA 


OFFSET 


00604A 


FAAB 


BO 


F37D 


A 




SUBA 


BEGA+1 




00605A 


FAAE 


F2 


F37C 


A 




SBCB 


BEGA 




00606 










* 








00607A 


FAB1 


80 


03 


A 




SUBA 


#3 


AND ADJUST 


00608A 


FAB 3 


G2 


00 


A 




SBCB 


#0 




00609A 


FAB 5 


B7 


F3C7 


A 




STAA 


TEMP+1 




00610A 


FAB8 


F7 


F3C6 


A 




STAB 


TEMP 




00611A 


FABB 


CE 


F3C6 


A 




LDX 


#TEMP 


PRINT ADDR 


00612A 


FABE 


36 








PSHA 






00613A 


FABF 


BD 


F9B0 


A 




JSR 


OUT4HS 




00614 










* 








00615 










* 


CHECK PROPER RANGE 




00616 










* 








00617A 


FAC2 


32 








PULA 






00618A 


FAC3 


49 








ROLA 






00619A 


FAC4 


59 








ROLB 






00620A 


FAC5 


CI 


00 


A 




CMPB 


#0 




00621A 


FAC7 


27 


9C FA65. 




BEQ 


C5 




00622A 


FAC9 


CI 


FF 


A 




CMPB 


#$FF 




00623A 


FACB 


27 


98 FA65 




BEQ 


C5 




00624A 


FACD 


CE 


FE5A 


A 




LDX 


#BADJP 


TELL EM 


00625A 


FADO 


8D 


02 FAD4 




BSR 


PD2 


IT'S BAD 


00626A 


FAD 2 


20 


91 FA65 




BRA 


C5 




00627 


















00628A 


FAD4 


7E 


F995 


A 


PD2 JMP 


PDATA1 





PAGE 021 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00630 

>0631 

#0632 

00633 

00634 

00635 

00636 

00637A 

00638A 

00639 

00640A 

00641A 

00642A 

00643A 

00644A 

00645 

00646 

00647 

00648 

00649A 

00650A 

00651A 

00652A 

00653 

00654 

00655 

00656 

" k 0657A 

130658A 



FAD 7 
FADA 

FADD 
FADE 
FAE.O 
FAE1 
FAE4 



FAE6 
FAE8 
FAE9 
FAEC 



FAEE 
FAFO 



* 
* 

* CONSTANT INITIALIZATION 

* S = POINTER TO ROM BYTES TO BE COPIED TO RAM 

* X = POINTER TO RAM BYTES TO BE INITIALIZED 



FAD7 
8E F871 
CE F382 



A 
A 
A 



START EQU 
LDS 
LDX 

* 



* ACTUAL CODE START 

#ADRS TR-1 START OF CONSTANT DATA 
#SP START OF RAM AREA 



32 

A7 00 A 
08 

8C F3A0 A 
26 F7 FADD 



6F 00 A 
08 

8C F3DA A 
26 F8 FAE6 



INILP1 PULA 

STAA 0 , X 
INX 

CPX #BRANEN 

BNE INILP1 

* 

* INITIALIZATION TO 0 

* X HOLDS INDEX OF 1ST 
* 

INILP2 CLR 0,X 
INX 

CPX #ENDIN0 

BNE INILP2 
* 

* SET CC SO WHEN WE 'GO' TO USER PGM THE 

* INTERUPT MASK IS SET 



GET NEXT CONSTANT BYTE 
INIT NEXT RAM BYTE 
UPDATE POINTER 
END OF CONSTANT RAM AREA? 
NO, CONTINUE INITIALIZATION 



BYTE TO BE SET TO 0 

CLEAR NEXT BYTE OF RAM 
UPDATE INDEX 
ANY MORE BYTES TO INIT? 
NO, CONTINUE CLEARING 



86 DO 
B7 F370 



A 
A 



LDAA 
STAA 



#$D0 
STACK+1 



PUT IN STACK TO BE PULLED 



7? 



PAGE 022 TVBUG46 . SA: 0 TVBUG 1. 



A A /" /"* A 

00660 










* 




00661 










* 


INITIALIZE 


00662 










* 


& KEYBOARD 


00663 










* 




00664A 


FAF3 


BE 


F382 


A 


ESC1 LDS 


00665A 


PAF6 


86 


3C 


A 




LDAA 


00666A 


FAF8 


B7 


F421 


A 




STAA 


00667A 


FAFB 


B7 


F423 


A 




STAA 


00668 










* 




00669A 


FAFE 


86 


03 


A 




LDAA 


00670A 


FBOO 


B7 


F408 


A 




STAA 


00671 














00672 










IS 


CONFIGURE 


00673 










•k 




00674A 


FB03 


7F 


t«i A A f 

F406 


A 




CLR 


00675A 


FB06 


7F 


F404 


A 




CLR 


00676A 


FB09 


86 


04 


A 




LDAA 


A A C *7 -ftk. 

00677A 


FBOB 


B7 


Tt A A C 

F405 


A 




STAA 


00678A 


FBOE 


B7 


F407 


A 




STAA 


00679 










* 




A A C O A "A 


FB11 


BD 


TUTS Ik O 

FFAo 


A 




JSR 


00681A 


FB14 


CE 


FDDD 


A 




LDX 


00682A 


FB17 


BD 


F995 


A 




JSR 


00683A 


FB1A 


CE 


FA88 


A 




LDX 


00684A 


FB1D 


FF 


F380 


A 




STX 


00685 










* 





2 A VDG MONITOR FOR 6800 , 01 , 02 , 03 ,£8 SYSTEM 



KC TAPE ACIA 
PIA 



SP 
#$3C 

KEYAC KILL HEX KEYBRD & TRACE 
KEYBC FOR D2 KIT 

#3 

ACIAS KILL KC TAPE 

PIA FOR VDG & ASCII KBD 

PIABD 
PIAAD 
#4 

PIAAC 
PI ABC 

INIT CLEAR SCREEN 

#MCL2 PRINT HEADER 
PDATA1 PRINT DATA STRING 
#NMI INIT PDN 

NIO 



PAGE 023 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00687 










* 








-90688 










* 


MAIN COMMAND /CONTROL 


LOOP 


^0689 










* 








00690 






FB20 


A 


CONTRL EQU 


* 




00691 










* 








00692 












RESTORE STACK POINTER REGISTER 


00693 










* 








00694A 


FB20 


BE 


F382 


A 




LDS 


SP 


SP WAS INITIALIZED EARLIER 


00695A 


FB23 


CE 


FE49 


A 




LDX 


# READY 




00696A 


FB26 


8D 


AC FAD 4 




BSR 


PD2 




00697 










* 








00698 










* 








00699 










* 








00700A 


FB28 


BD 


FEE1 


A 




JSR 


INCH1 


READ COMMAND CHARACTER 


00701A 


FB2B 


16 








TAB 




SAVE CHARACTER IN B 


00702A 


FB2C 


BD 


F9B4 


A 




JSR 


OUTS 


PRINT SPACE AFTER COMMAND 


00703 










* 








00704 










* 


B REGISTER 


HOLDS CHARACTER INPUT BY USER. 


00705 










* 


USE JUMP TABLE TO GO 


TO APPROPRIATE ROUTINE. 


00706 










* 








00707A 


FB2F 


CE 


F833 


A 




LDX 


#FCTABL 


X:= ADDRESS OF JUMP TABLE 


00708A 


FB32 


El 


00 


A 


NXTCHR CMPB 


0,X 


DOES INPUT CHAR MATCH? 


00709A 


FB34 


27 


OA FB40 




BEQ 


GOODCH 


YES, GOTO APPROPRIATE ROUTINE 


00710A 


FB36 


08 








INX 




ELSE, UPDATE INDEX INTO TABLE 


00711A 


FB37 


08 








INX 






00712A 


FB38 


08 








INX 






00713A 


FB39 


8C 


F872 


• A 




CPX 


#FCTBEN 


END OF TABLE REACHED? 


V 0714A 


FB3C 


26 


F4 FB32 




BNE 


NXTCHR 


NO, TRY NEXT CHAR 


o0715A 


FB3E 


20 


EO FB20 




BRA 


CONTRL 


NO MATCH, REPROMPT USER 


00716 










* 








00717 










* 








00718A 


FB40 


EE 


01 


A 


GOODCH LDX 


1,X 


GET ADDRESS FROM J.T. 


00719A 


FB42 


6E 


00 


A 




JMP 


0,X 


GOTO APPROPRIATE ROUTINE 


00720 










* 








00721 










* 









00723 * 

00724 * 

00725A FB44 7E F929 A BADDRJ JMP BADDR GO BUILD ADDRESS 



79 



PAGE 024 TVBDG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00727 

00728 

00729 

00730 

00731A 

00732A 

00733A 

00734 

00735 

00736 

00737A 

0073"8 

00739A 

00740A 

00741 

00742 

00743 

00744A 

00745A 

00746A 

00747 

00748 

00749 

00750A 

00751A 

00752A 

00753A 



FB47 86 01 A 
FB49 8D 5B FBA6 
FB4B 20 56 FBA3 



FB4D 8D F5 FB44 



* 

* 

* RESET ALL BREAKPOINTS 

DELBRK LDAA #1 
BSRBRK BSR BRKSDB 
BRA CNTRL2 

* RESET 1 BREAKPOINT 
RSTBRK BSR BADDRJ 



RESET BREAKS FLAG 
BREAK HANDLING SUBR. 
RETURN TO COMMAND LEVEL 



FB4F 4F 

FB50 20 F7 FB49 



FB52 BD F99C A 
FB55 86 02 A 
FB57 20 F0 FB49 



FB59 8D E9 FB44 
FB5B 86 04 A 
FB5D 8D 47 FBA6 
FB5F 20 Fl FB52 



CLRA 
BRA 



BSRBRK 



PUTS USER ENTERED ADDRESS 

INTO XHI,XLOW 
RESET 1 BREAK FLAG 
GO RESET 1 



* PRINT OUT ALL NON-ZERO BREAK ADDRESSES 
* 

PNTBRK JSR PCRLF 
LDAA #2 
BRA BSRBRK 



DO CR/LF 

PRINT BREAK ADDRESSES FLAGS 
GO PRINT 



* SET ONE BREAK 
* 

SETBRK BSR BADDRJ 
LDAA #4 
BSR BRKSUB 
BRA PNTBRK 



GET USER ENTERED ADDRESS (XHI,XLOW 
SET ONE BREAK FLAG 
GO SET IT 

PRINT ALL BREAKPOINTS 



Bo 



\-*4 



PAGE 025 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00755 










* 








>,0756 










* GO TO REQUESTED 




^0757 










* 








00758A 


PB61 


8D 


El FB44 


GOTO 


BSR 


BADDRJ 


GO GET ADDRESS FROM USER 


00759 










* 






XHI, XLOW HOLD ADDRESS 


00760A 


FB63 


86 


FF 


A 




LDAA 


#$FF 


FLAG FOR PUTTING IN BREAKS 


00761A 


FB65 


8D 


3F FBA6 




BSR 


BRKSUB 


GO PUT IN BREAKS 


00762A 


FB67 


30 








TSX 






00763A 


FB68 


B6 


F3CE 


A 




LDAA 


XHI 


SAVE PCH ON STACK 


00764A 


FB6B 


A7 


05 


A 




STAA 


5,X 




00765A 


FB6D 


B6 


F3CF 


A 




LDAA 


XLOW 


PSH PCL 


0076"5A 


FB70 


A7 


06 


A 




STAA 


6,X 




00767A 


FB72 


3B 








RTI 




GO TO USER PRG 


00768 










* 








00769 










* SINGLE INSTRUCTION TRACE REQUESTED 


00770 










* 








00771A 


FB73 


CE 


0001 


A 


NEXT 


LDX 


#1 


# INSTRUCTIONS TO TRACE 


00772A 


FB76 


7F 


F3D9 


A 


TRACE 2 


CLR 


BRKTRC 


CLEAR FLAG INDICATING TRACE 


00773 










* 






IS DUE TO BREAK 


00774A 


FB79 


FF 


F3A3 


A 


TRACE 3 


STX 


NT RACE 


SAVE # INST'S TO TRACE 


00775A 


FB7C 


FE 


F382 


A 




LDX 


SP 


X : = STACK POINTER 


00776A 


FB7F 


EE 


06 


A 




LDX 


6,X 


X : = INSTR TO BE EXECUTED 


00777A 


FB81 


FF 


F3A0 


A 




STX 


TRCADR 


SAVE IN TRACE ADDRESS STORE 


00778A 


FB84 


A6 


00 


A 




LDAA 


0,X 


GET INSTRUCTION TO BE TRACED 


00779A 


FB86 


B7 


F3A2 


A 




STAA 


TRCINS 


SAVE IN INSTRUCTION STORE 


00780A 


FB89 


7E 


FD37 


A 




JMP 


CONTRC 


CONTINUE TRACE PART OF PROGRAM 


00781 
1)782 










* 
















* MULTIPLE INSTRUCTION 


TRACE 


tf0783 










* 








00784A 


FB8C 


8D 


B6 FB44 


TRACE 


BSR 


BADDRJ 


GET # OF INSTRUCTIONS TO TRACE 


00785A 


FB8E 


20 


E6 FB76 




BRA 


TRACE 2 ' 


GO TRACE' M 


00786 










* 








00787 










* CONTINUE EXECUTION 




00788 










* 








00789A 


FB90 


7C 


F3D9 


A 


CONT 


INC 


BRKTRC 


TRACE 1 TO RESTORE SWI'S 


00790A 


FB93 


CE 


0001 


A 




LDX 


#1 


ONE TRACE ONLY 


00791A 


FB96 


20 


El FB79 




BRA 


TRACE 3 




00792 










* 








00793 










* 








00794 










* R COMMAND 






00795 










* 








00796 










* PRINT STACK 


CONTENTS 




00797 










* 








00798A 


FB98 


BD 


F99C 


A 


PSTAK1 


JSR 


PCRLF 


PRINT CR LF 


00799A 


FB9B 


CE 


FE11 


A 




LDX 


#MCL3 


PRINT HEADER 


0080 OA 


FB9E 


BO 


F995 


A 




JSR 


PDATA1 




00801A 


FBA1 


8D 


7B FC1E 




BSR 


PRINT 


PRINT STACK 


00802A 


FBA3 


7E 


FB20 


A 


CNTRL2 


JMP 


CONTRL 


RETURN TO COMMAND LEVEL 



PAGE 026 TVBUG46 .SA:0 TVBUG 1. 2 A VDG MONITOR FOR 6800, 01, 02, 03, 08 SYSTEM 



00804 ********** 

00805 * 

00806 * BRKSUB 

00807 * 

00808 * 

00809 * THIS ROUTINE DOES A NUMBER OF OPERATIONS HAVING 

00810 * TO DO WITH BREAKPOINTS. 

00811 * 

0 0812 * THE A REGISTER DETERMINES FUNCTION PERFORMED: 

00813 * 

00814 * A = -1 =" BREAKS ARE PUT INTO USER'S CODE 
0081-5 * A - 0 =" THE BREAKPOINT WHOSE ADDRESS IS IN 

00816 * XHI, XLOW IS PURGED; 

00817 * ALL BREAKPOINTS ARE TEMPORARILY REMOVED 

00818 * A = 1 = " ALL BREAKPOINTS ARE PURGED 

00819 * A = 2 =" ALL BREAKPOINTS ARE PRINTED OUT 

00820 * ALL BREAKPOINTS ARE TEMPORARILY REMOVED 

00821 * A = 3 =" ALL BREAKPOINTS ARE TEMPORARILY REMOVED 

00822 * A = 4 =" THE BREAK ADDRESS IN XHI, XLOW IS 

00823 * PUT INTO THE FIRST ZERO BREAKPOINT 

00824 * POSITION; ALL BREAKS ARE TEMPORARILY REMOVED 

00825 * 

00826 ********** 

00827 * 

00828 FBA6 A BRKSUB EQU * 

00829A FBA6 BF F3D0 A STS SSAVE SAVE S SO WE CAN USE 

0083 OA FBA9 B7 F3C5 A STAA ASAVE A HOLDS THE FUNCTION # 

00831 * 

00832A FBAC CE F3A5 , A LDX fBRKADR INIT X FOR LOOP THROUGH BREAKS 

00833 * 

00834 * START OF LOOP THROUGH BREAK ADDRESSES 

00835 * 

00836A FBAF B6 F3C5 A BRKLP LDAA ASAVE GET FUNCTION # 

00837A FBB2 AE 00 A LDS 0,X S:=NEXT ADDRESS IN BRKPT LIST 

00838A FBB4 27 2D FBE3 BEQ LN IF 0, THEN NOT A VALID BREAK 

00839 * 

00 84 OA FBB6 7D F3D8 A TST BRKSIN ARE BREAKS IN USER'S CODE? 

00841A FBB9 27 36 FBFl BEQ NOBRIN BRANCH, IF NOT 

00842 * 

00843 - * BREAKS ARE IN USER'S CODE 

00844 ' * 

00845A FBBB 4D TSTA SHOULD BREAKS BE IN? 

00846A FBBC 2B 21 FBDF BMI BKDONE YES, RETURN TO CALLER 

00847 * 

00848 * BREAKS ARE TO BE TAKEN OUT OF USER'S 

00849 * CODE TEMPORARILY 

00850 * 

00851A FBBE A6 10 A LDAA 2*NBRBPT,X GET INSTR. BELONG- 

00852 * ING IN USER CODE 

00853A FBCO 36 PSHA PUT IT THERE 



<3* 



PAGE 027 TVBUG46 .SA:Q TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00855 * 

£0856 * OTHER ACTIONS TO BE PERFORMED EACH TIME THROUGH 

10857 * LOOP WHEN BREAK ADDRESS NOT EQUAL TO 0. 

"00858 * 



A A O C A 71 

0 085 9A 


FBC1 


B6 


F3C5 


A 


BKC0N1 


LDAA 


ASAVE 


# OF B 


U UOOUA 


TPTir' A 

r oUft 


z / 


37 


FBFD 




BEQ 


FNDRPL 


SEE IF BREAKPOINT NEEDS TO 


UUODl 












* 






BE REPLACED 


U (Job AK 


FBCb 


O 1 

81 


01 




A 




CMPA 


#1 


IS BRK ADDRESS TO BE RESET? 


y UOD jrt 


r dv^ o 


9 7 


41 


FC0B 




BEQ 


CLRBRK 


YES, SET BRK ADR TO 0 


U U O O ft 












* 








U UoDDA 


b bua 


Q 1 
ol 


02 




A 




CMPA 


|2 


IS BRK ADDR TO BE PRINTED? 


U U OQ.OA 




0 7 
Z / 


49 


FC17 




BEQ 


PRNTBK 


YES, GO PRINT ADDRESS 


OOoo / 












* 








A A O £ O 

0 0 868 












* UPDATE LOOP 


INDEX AND LOOP IF APPROPRIATE 


0086 y 












* 








00870A 


FBCE 


A O 

08 








BKC0N2 


INX 




MAKE X POINT TO 


00871A 


FBCF 


08 










INX 




NEXT BREAK ADDRESS 


00872A 


FBD0 


8C 


F3B5 


A 


BKC0N3 


CPX 


#BRKINS 


ANY MORE BREAKS? 


00873A 


FBD3 


26 


DA 


FBAF 




BNE 


BRKLP 


YES, LOOP 


00874 












* 








a n t r 

00875 












* WRAP- 


-UP PROCESSING 


AND EXIT 


A A O *7 ^ 

00876 












* 








00877A 


FBD5 


4F 










CLRA 




A = BREAKS IN FLAG 


00878A 


FBD6 


7D 


F3C5 


A 




TST 


ASAVE 


IS FUNCTION = -1? 


00879A 


FBD9 


2A 


01 


FBDC 




BPL 


BKPUT 


NO, SO BRKSIN * 0 


00880A 


FBDB 


4C 










INCA 




FCTN = -1 = " BRKSIN: =1 


00881A 


FBDC 


B7 


F3D8 


A 


BKPUT 


STAA 


BRKSIN 


STORE APPROPRIATE FLAG 


„00882 












* 








;0883 












* RESTORE S-REG AND RETURN TO CALLER 


00884 












* 








00885A 


FBDF 


BE 


F3D0 


A 


BKDONE 


LDS 


SSAVE 


RESTORE USER S-REG 


00886A 


FBE2 


39 










RTS 




RETURN 



85 



PAGE 028 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00888 * 

00889 * MISCELLANEOUS ROUTINES FOR BRKSUB 

00890 * 

008 91 * BREAKPOINT ADDRESS = 0 - IF FUNCTION = 4 THEN 

00892 * PUT BREAKPOINT ADDRESS IN CURRENT POSITION 

00893 * A HOLDS THE FUNCTION #, X HOLDS BREAKPOINT INDEX 

00894 * 

00895A FBE3 81 04 A LN CMPA #4 IS FUNCTION = 4 

00896A FBE5 26 E7 FBCE BNE BKCON2 IF NOT, THEN CONTINUE LOOP 

00897 * 

00898A FBE7 BE F3CE A LDS XHI GET NEW BREAK ADDRESS 

0089~9A FBEA AF 00 A STS 0,X PUT IN CURRENT POSITION 

00900 * 

00 901A FBEC 7A F3C5 A DEC ASAVE DO NOT PLACE ADDRESS MORE 

00902 * THAN ONCE-CONT TO 

00903 * TAKE OUT BREAKPOINTSo 
00904A FBEF 20 DD FBCE BRA BKCON2 CONTINUE LOOP 



PAGE 029 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



00906 










* 






f 0 90 7 










* BREAKS ARE 


NOT IN AND ADDRESS IS NON-ZERO. 


$0908 










* IF FUNCTION = -1 THEN SWI'S ARE TO BE PUT IN. 


00909 










* A HOLDS FUNCTION NUMBER, S HOLDS ADDRESS 


00910 










* 






00911A 


FBF1 


4D 






NOBRIN TSTA 






00912A 


FBF2 


2A 


CD 


FBC1 


BPL 


BKCON1 


NO, CONTINUE 


00913 










* 






0 0 914A 


FBF4 


O A 

34 






DES 




MAKE ADDRESS POINT TO 1 LESS 


00915A 


FBF5 


32 






PULA 




GET USER INSTRUCTION 


00916A 


FBF6 * 


A7 


10 


A 


STAA 


2*NBRBPT 


,X SAVE 


009£7A 


FBF8 


86 


3F 


A 


LDAA 


#SWI 


GET SWI OP CODE 


00918A 


FBFA 


36 






PSHA 




REPLACE USER INSTRUCTION 


00919A 


FBFB 


20 


Dl 


FBCE 


BRA 


BKCON2 


CONTINUE LOOP 


A A A *"> A 

00920 










it 






00921 










* FUNCTION=0 


, BRK ADDR 


NOT = 0, USER'S INSTR 


00922 










* IS IN (NOT 


SWI) . 




A A A O O 

0092 J 










* IF ADDRESS 


= XHI,XLO 


THEN SET ADDRESS = 0 


00924 
















0092 5A 


FBFD 


A6 


00 


A 


FNDRPL LDAA 


0,X 


GET TOP BYTE OF ADDRESS 


00926A 


FBFF 


Bl 


F3CE A 


CMPA 


XHI 


DO TOP BYTES COMPARE 


00927A 


FC02 


26 


CA 


FBCE 


BNE 


BKCON2 


NO, CONTINUE LOOP 


00928A 


FC04 


E6 


01 


A 


LDAB 


1,X 


GET LOW BYTE OF ADDR 


00929A 


FC06 


Fl 


F3GF A 


CMPB 


XLOW 


SAME FOR LOW BYTES 


00930A 


FC09 


26 


C3 


FBCE 


BNE 


BKCON2 




00931 










* 






00932A 


FC0B 


6F 


00 


A 


CLRBRK CLR 


0,X 


CLEAR OUT BREAK 


^0933A 


FC0D 


6F 


01 


A 


CLR 


i,x 


ADDRESS FIELD 


O0934A 


FC0F 


20 


BD 


FBCE 


BRA 


BKCON2 


CONTINUE LOOP 


A A A O C 

0093 5 










* 






00936 










it 






00937A 


FC11 


7E 


F9B2 A 


OT2HS JMP 


OUT2HS 




0093 8A 


FC14 


7E 


F9B0 A 


OT4HS JMP 


OUT4HS 




00939 










* 






00940 










* PRINT OUT ! 


BREAK ADDRESS 


00941 










* FUNCTION = 


2, BREAK 


ADDRESS NOT = 0, X = ADDRESS INDEX 


00942 










* 






00943A 


FC17 


BE 


F3D0 A 


PRNTBK LDS 


SSAVE 




00944A 


FC1A 


8D 


F8 


FC14 


BSR 


OT4HS 


OUTPUT ADDRESS AND SPACE 


00945A 


FC1C 


20 


B2 


FBD0 


BRA 


BKCON3 


OUT4HS INCREMENTS X, 


00946 










it 




SO BYPAS 2 INX'S 



PAGE 030 TVBUG46 .SAsO TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,0-8 SYSTEM 



00948 * 

00949 * PRINT CONTENTS OF STACK 

00950 * 



00951A 


FC1E 


BD 


F99C A PRINT 


JSR 


PCRLF 


PRINT CR LF 


00952A 


FC21 


FE 


F382 A 


LDX 


SP 


PRINT OUT STACK 


00953A 


FC24 


08 




INX 






00954A 


FC25 


8D 


EA FC11 


BSR 


OT2HS 


CONDITION CODES 


00955A 


FC27 


8D 


E8 FC11 


BSR 


OT2HS 


ACC-B 


00956A 


FC29 


8D 


E6 PC 11 


BSR 


OT2HS 


ACC-A 


00957A 


FC2B 


8D 


E7 FC14 


BSR 


OT4HS 


X-REG 


00958A 


FC2D 


8D 


E5 FC14 


BSR 


OT4HS 


P-COUNTER 


009S9A 


FC2F 


CE 


F382 A 


LDX 


#SP 




00960A 


FC32 


8D 


E0. FC14 


BSR 


OT4HS 


STACK POINTER 


00961A 


FC34 


39 




RTS 







PAGE 031 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800 , 01, 02 , 03, 08 SYSTEM 



00963 

00964 

^)0965 

00966 

00967 

00968 

00969 

00970A 

00971A 

00972A 

00973 

00974A 

00975A 

00976A 

00977A 

00978A 

00979A 

00980A 

00981A 

00982A 

00983A 



FC35 BD F96C 
FC38 09 
FC39 FF F37E 

FC3C CE FFED 
FC3F BD F995 
FC42 CE F3DA 
FC45 BD FEE1 
FC48 A7 00 
FC4A 08 
FC4B 81 0D 
FC4D 26 F6 FC 
FC4F 86 04 
FC51 A7 00 



********** 

* PUNCH DUMP 

* PUNCH FROM BEGINING ADDRESS (BEGA) THRU ENDING 

* ADDRESS (ENDA) 
********** 

* FIRST GET START & END ADDRESS 
* 



A 


PUNCH 


JSR 


GETADR 






DEX 




A 


* 


STX 


ENDA 


A 




LDX 


#HEADMS GET TITLE 


A 




JSR 


PDATA1 


A 




LDX 


fHEADBF 


A 


PUN 00 


JSR 


INCH1 


A 




STAA 


0,X 






INX 




A 




CMPA 


#$D 


15 




BNE 


PUN 00 


A 




LDAA 


#4 


A 




STAA 


o,x 



3-31 



PAGE 032 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800 , 01 , 02 , 03 , 08 SYSTEM 
00985 * 



00986 








* NOW I 


START 


PUNCH 




00987 








* 








00988A 


FC53 


86 


51 A 




LDAA 


#$51 


8 BIT, 2 STOP DIV 


00989A 


FC55 


B7 


F408 A 




STAA 


AC IAS 


RTS NOT HI 


00990A 


FC58 


CE 


03FF A 




LDX 


#$03FF 




00991 A 


FC5B 


8D 


7D FCDA 




BSR 


PNLDR 




00992A 


FC5D 


86 


80 A 




LDAA 


#$80 




00993A 


FC5F 


8D 


58 FCB9 




BSR 


KCOUT 




00994A 


FC61 


CE 


F3DA A 




LDX 


IHEADBF 




00995A 


FC64 


8D 


6D FCD3 


PUND05 


BSR 


PUN 




00996A 


FC66 


81 


OD A 




CMPA 


#$D 




00997A 


FC68 


26 


FA FC64 




BNE 


PUND05 




00 9 98 A 


FC6A 


86 


FF A 




LDAA 


#$FF 




00999A 


FC6C 


8D 


4B FCB9 




BSR 


KCOUT 




01 00 OA 


FC6E 


F6 


F37F A 


PUND10 


LDAB 


ENDA+1 




01001A 


FC71 


FO 


F37D A 




SUBB 


BEGA+1 




01002A 


FC74 


B6 


F37E A 




LDAA 


ENDA 




01003A 


FC77 


B2 


F37C A 




SBCA 


BEGA 




01004A 


FC7A 


27 


02 FC7E 




BEQ 


PUND25 




01005A 


FC7C 


C6 


FF A 




LDAB 


' #$FF 
#*B 




01006A 


FC7E 


86 


42 A 


PUND25 


LDAA 


PUNCH A B 


01007A 


FC80 


8D 


37 FCB9 




BSR 


KCOUT 




01008A 


FC82 


37 






PSHB 






01009A 


FC83 


30 






TSX 






01010A 


FC84 


8D 


4D FCD3 




BSR 


PUN 




01011A 


FC86 


32 






PULA 




BYTE COUNT 


01012A 


PC 8 7 


4C 






INCA 






01013A 


FG88 


B7 


F3D2 A 




STAA 


CHRCNT 




01014A 


FC8B 


CE 


F37C A 




LDX 


#BEGA 


PUNCH ADDRESS 


01015A 


FC8E 


8D 


43 FCD3 




BSR 


PUN 




01016A 


FC90 


8D 


41 FCD3 




BSR 


PUN 




01017A 


FC92 


FE 


F37C A 




LDX 


BEGA 


PUNCH DATA 



8ft f>-^ 



PAGE 033 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01019A 


FC95 


8D 


3C FCD3 


PUND30 BSR 


PUN 




>U020A 


FC97 


7A 


F3D2 


A 


DEC 


CHRCNT 




^1021A 


FC9A 


26 


F9 FC95 


BNE 


PUND30 




01022A 


FC9C 


FF 


F37C 


A 


STX 


BEGA 




01023A 


FC9F 


CE 


0096 


A 


LDX 


#$96 




01024A 


FCA2 


8D 


36 FCDA 


BSR 


PNLDR 


150 l'S 


01025A 


FCA4 


FE 


F37C 


A 


LDX 


BEGA 




01026A 


FCA7 


09 






DEX 






01027A 


FCA8 


BC 


F37E 


A 


CPX 


ENDA 




01028A 


FCAB 


26 


CI FC6E 


BNE 


PUND10 




01029A 


FCAD 


86 


47 


A 


LDAA 


#'G 




01030A 


FCAF 


8D 


08 FCB9 


BSR 


KCOUT 


PUNCH END CHAR 


01031A 


FCB1 


CE 


0019 


A 


LDX 


#$19 




01032A 


FCB4 


8D 


24 FCDA 


BSR 


PNLDR 




01033A 


FCB6 


7E 


FB20 


A 


JMP 


CONTRL 




01034 










* 






01035 










♦SUBROUTINE TO PUNCH A 


BYTE 


01036 










* BYTE IS DISPLAYED ON 


TV AS 2 HEX 


01037 










* NO REGISTER 


CHANGED 




01038A 


FCB9 


37 






KCOUT PSHB 






01039A 


FCBA 


BD 


FA1A 


A 


KC1 JSR 


CHKESC 




01040A 


FCBD 


F6 


F408 


A 


LDAB 


AC IAS 


READY??? 


01041A 


FCCO 


57 






ASRB 






01042A 


FCC1 


57 






ASRB 






01043A 


FCC 2 


24 


F6 FCBA 


BCC 


KC1 




01044A 


FCC 4 


B7 


F409 


A 


STAA 


AC IAD 




.01045A 


FCC 7 


33 






PULB 






51046A 


FCC 8 


36 






PSHA 






''01047A 


FCC9 


BD 


F982' 


A 


JSR 


OUTHL 


SEND BYTE ( IN HEX) 


01048A 


FCCC 


32 






PULA 




TO VDG DISPLAY 


01049A 


FCCD 


36 






PSHA 






01050A 


FCCE 


BD 


F986 


A 


JSR 


OUTHR 




01051A 


FCD1 


32 






PULA 






01052A 


FCD2 


39 






RTS 






01053 










* 






01054 










*SUB TO PUNCH 


1 BYTE POINTED BY X REG 


01055 










* X=X+1 






01056 










* BYTE FETCH FROM MEMORY IS IN SYNC 


01057 










* WITH TV RETRACE 




01058A 


FCD3 


BD 


FE86" 


A 


PUN JSR 


SYNCLD 




01059A 


FCD6 


8D 


El FCB9 


BSR 


KCOUT 




01060A 


FCD8 


08 






I NX 






01061A 


FCD9 


39 






RTS 






01062 










* 






01063 










* PUNCH LEADER 




01064 










* 






01065A 


FCDA 


86 


FF 


A 


PNLDR LDAA 


#$FF 




01066A 


FCDC 


8D 


DB FCB9 


BSR 


KCOUT 




01067A 


FCDE 


09 






DEX 






01068A 


FCDF 


26 


F9 FCDA 


BNE 


PNLDR 




01069A 


FCE1 


39 






RTS 






01070 










* 







PAGE 034 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01072 

01073 

01074 

01075 

01076 

01077A 

01078 

01079A 

01 080 A 

01081 

01082 

01083 

01084A 

01085A 

01086A 

01087A 

01088A 

01089 

01090 

01091 

01092A 

01093A 

01094A 

01095 

01096A 

01097A 

01098A 

01099 

01100 

01101 

01102A 

01103A 

01104A 

01105A 

01106 

01107A 

01108A 

01109 

OHIO 

01111 

01112 

01113 

01114 

01115 

01116A 

01117A 



* 
* 

* SWI-1 SOFTWARE INTERRUPT LEVEL 1 PROCESSING 
* 



FGE2 A 

FCE2 BF F382 A 

FCE5 86 03 A 

FCE7 BD FBA6 A 



FCEA 30 

FCEB 6D 06 A 
FCED 26 02 FCFl 
FCEF 6A 05 A 
FCFl 6A 06 A 



FCF3 EE 05 A 
FCF5 BC F3A0 A 
FCF8 27 18 FD12 

FCFA A6 00 A 
FCFC 81 3F A 
FCFE 26 OC FDOC 



FDOO 30 

FD01 6C 06 A 
FD03 26 02 FD07 
FD05 6C 05 A 



SWI IS EQU 
STS 

* 

LDAA 
JSR 



FD07 FE F386 
FDOA 6E 00 



A 
A 



FDOC 

FDOC BD FC1E 
FDOF 7E FB20 



* 

SP 
#3 

BRKSUB 



* DECREMENT P-COUNTER 
* 



TSX 
TST 
BNE 
DEC 

SWI1S1 DEC 



6,X 

SWI1S1 

5, X 

6, X 



SAVE USER'S SP 



GO TAKE OUT ALL BREAKS 



X: -STACK POINTER - 1 
IF LOWER BYTE = 0 =" BORROW 
BRANCH IF BORROW NOT REQ'D 
DECREMENT UPPER BYTE 
DECREMENT LOWER BYTE 



* TEST FOR ADDRESS TRACE OR BREAK 



LDX 5,X X:=P COUNTER 

CPX TRCADR IS SWI FOR TRACE? 

BEQ TRCINH YES, GO TO TRACE INT HANDLER 

* 

LDAA 0,X GET INSTRUCTION CAUSING SWI 

CMPA #SWI WAS IT REPLACED BY CALL BREAKOUT 

t BNE BRKINH YES, SO MUST BE A BREAK 

* 

* USER SWI-TRANSFER THROUGH LEVEL 2 SWI 
* 



TSX 
INC 
BNE 
INC 

* 

INCNOV LDX 
JMP 

* 
* 
* 



X:=STACK POINTER 
6,X UPDATE LOW BYTE OF P-COUNTER 

INCNOV BRANCH IF NO CARRY 
5,X UPDATE HIGH BYTE IF NECESSARY 

SWI2 X:=PO INTER TO LEVEL 2 SWI HANDLER 

0,X GO TO LEVEL 2 HANDLER 



* BREAK INTERRUPT HANDLER 



A 
A 
A 



BRKINH EQU 
JSR 

CTRL JMP 



PRINT STOP AND SHOW REGS TO USER 
CONTRL RETURN TO CONTROL LOOP 



PAGE 035 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



A 1 1 1 A 
01119 










* 








A -1 1 *> A 

01120 










* 


TRACE INTERRUPT HANDLER 


U1121 










* 


P-COUNTER 


HAS BEEN DECREMENTED TO POINT AT SWI 


01122 










* 


TRCINS HOLDS OP CODE 


REPLACED BY SWI 


01123 












X HOLDS ADDRESS OF WHERE TRACE SWI IS 


A 1 1 1 >l 

U11Z4 


















A 1 1 O C TV 

01125A 


FulZ 


Bo 


F3A2 


A 


TRCINH LDAA 


TRCINS 


GET OP CODE OF TRACED INSTR 


OllzbA 


FDlO 


7V *7 

A / 


00 


A 




STAA 


0,X 


RESTORE TO USER'S CODE 




















n 1 1 9 Pa 

U JLX Z On 


r jjx / 


7n 


F3D9 


A 




morn 
lb 1 


BRKTRC 


IS PROCESSING TO BE 


A 1 1 0 Q 

uiizy 
















IMMEDIATELY CONTINUED? 


A 1 1 *3 A7V 
U llOUA 


TTlpV 1 TV 

c JJlA 


7 7 


OF FD2B 




BEQ 


NBKTRC 


BRANCH IF NOT 


01131 










* 








01132 










* 


PROCESSING 


IS TO "CONTINUE" 


01133 










* 








01134A 


FD1C 


7F 


F3D9 


A 




CLR 


BRKTRC 


RESET CONTINUE FLAG 


01135A 


FD1F 


86 


FF 


A 




LDAA 


#$FF 


FLAG TO SET BREAKS IN CODE 


A 1 1 O ^ TV 

01136A 


FD21 


BD 


FBA6 


A 




JSR 


BRKSUB 


PUT BREAKS IN 


A 1 1 O "7 TV 

01137A 


FD24 


7F 


F3A0 


A 




CLR 


TRCADR 


NO MORE TRACE, SO CLEAR ADDRESS 


A 1 1 O O TV 

01138A 


tin O 1 

FD27 


7F 


F3A1 


A 




CLR 


TRCADR+1 






£ JJZA 


JD 








RTI 




CONTINUE 


A 1 1 Vl A 

U114U 


















A 1 1 Vl 1 

01141 










* 


TRACE IS DUE TO N OR 


T TRACE COMMANDS 




















A 1 1 vl "3 7V 

0114 JA 


FDzB 


BD 


FC1E 


A 


NBKTRC JSR 


PRINT 


PRINT. STACK 


A 1 1 Vf Vl TV 

01144A 


FD2E 


FE 


F3A3 


A 




LDX 


NT RACE 


GET # INSTRUCTIONS TO TRACE 




TPT\ Q 1 

r UJl 










DEX 




DECREMENT COUNT 


A 1 1 A C TV 

011 4 6A 


FD32 


FF 


F3A3 


A 




STX 


NTRACE 


AND RESTORE 


A 1 1 VI "7 TV 

01147A 


FD 35 


27 


D8 FD0F 




BEQ 


CTRL 


BRANCH IF ALL TRACES DONE 












* 








A 1 1 A Q 

u 114 y 










* 


TRACE NOT 


DONE - TRACE NEXT INSTRUCTION 


A 1 1 C A 

01150 










* 








01151A 


FD37 


B6 


F3A2 


A 


CONTRC LDAA 


TRCINS 


GET CURRENT INSTRUCTION 


01152A 


FD3A 


B7 


F388 


A 




STAA 


BRINS 


SAVE IN CASE IT'S A BRANCH 


01153A 


FD3D 


8D 


70 FDAF 




BSR 


OPCBYT 


GO GET # BYTES/TYPE 


01154A 


FD3F 


4D 








TSTA 




CHECK FOR BRANCH 


01155A 


FD40 


2A 


35 FD77 




BPL 


CKOBRA 


CHECK FOR OTHER THAN BRANCH 



PAGE 036 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800, 01, 02, 03, 08 SYSTEM 



01157 

01158 

01159 

01160 

01161 

01162A 

01163A 

01164A 

01165A 

01166A 

01167 

011~68 

01169 

01170 

01171A 

01172A 

01173 

01174 

01175 

01176 

01177A 

01178A 

01179A 

01180A 

01181A 

01182A 

01183 

01184A 

01185 

01186A 

01187A 

01188A 

01189A 

01190A 

01191A 

01192 

01193 

01194 

01195A 

01196A 

01197A 

01198A 

01199 

01200 

01201 

01202A 

01203A 

01204A 

01205A 

01206A 

01207A 



* 
* 
* 



FD42 32 
FD43 34 
FD44 8A 10 
FD46 06 
FD47 7E F388 



FD4A 86 02 A 
FD4C 20 29 FD77 



FD4E FE F3A0 A 
FD51 A6 01 A 
FD53 08 
FD54 08 

FD55 2B 12 FD69 
FD57 8D 16 FD6F 

FD59 FF F3A0 A 



RELATIVE BRANCH TYPE INSTRUCTION 

DETERMINE WHERE TO PUT SWI 

S- HOLDS POINTER TO USER STACK AFTER SWI 

PULA GET CONDITION CODE 

DES UPDATE STACK PTR AFTER PULL 

ORAA #%00010000 MAKE INT'S INHIBITED 
TAP RESTORE USER'S C. CODE REG 

JMP BRINS GO SEE HOW RELATIVE BRANCH 

FARES 



* 
* 
* 
* 

BRNOGO LDAA 
BRA 

* 

* BRANCH WAS 

* JUMPED TO 
* 

BRGO 



BRANCH WAS NOGO - PUT SWI AT NEXT INSTRUCTION 



#2 A = # BYTES AFTER CURRENT INSTR 

CKOBRA GO PUT SWI APPROPRIATELY 

GO, PUT SWI AT ADDRESS BEING 



BRGl 

BRG2 
* 



FD5C 
FD5E 
FD61 
FD63 
FD65 
FD68 



FD69 
FD6A 
FD6B 
FD6D 



FD6F 
FD70 
FD72 
FD73 
FD74 
FD76 



A6 00 
B7 F3A2 
86 3F 
A7 00 
BE F382 
3B 



A 
A 
A 
A 
A 



LDX 


TRCADR 


X : ■ TRACE ADDRESS 


LDAA 


i,x 


GET BRANCH OFFSET 


I NX 




OFFSET IS RELATIVE TO 


INX 




INSTR FOLLOWING BRANCH 


BMI 


BRGO DC 


BRANCH IF OFFSET NEGATIVE 


BSR 


INCX 


INCREMENT X BY AMOUNT IN 






A REG 


STX 


TRCADR 


SAVE ADDRESS OF NEXT 






INSTR TO STOP ON 


LDAA 


0,X 


GET INSTRUCTION TO BE REPLACED 


STAA 


TRCINS 


SAVE 


LDAA 


#SWI 


GET SWI OP CODE 


STAA 


0,X 


REPLACE INSTR WITH SWI 


LDS 


SP 


GET ORIGINAL STACK POINTER 


RTI 




TRACE ANOTHER INSTR 



09 
4C 

26 FC FD69 
20 EA FD59 



* X NEEDS TO BE DECREMENTED (OFFSET NEGATIVE) 
* 

BRGO DC DEX 
INCA 

BNE BRGO DC 
BRA BRG2 
* 

* SUBROUTINE TO INCREMENT X BY CONTENTS OF A 
* 

INCX 



DECREMENT ADDRESS 
INCREMENT COUNTER 
IF COUNTER NOT 0, BRANCH 
IF DONE, GO RETURN TO USER PROG 



4D INCX TSTA 

27 04 FD76 BEQ INCXR 

08 INXLP INX 

4A DECA 

26 FC FD72 BNE INXLP 

39 INCXR RTS 



IS A = 0? 
IF SO, INC DONE 
ELSE INCREMENT X 
DECREMENT COUNT 
IF COUNT NOT YET 0, LOOP 
RETURN FROM THIS SUBROUTINE 



92 



PAGE 037 TVBDG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01209 










* 






01210 










* INSTRUCTION TO BE TRACED IS NOT A BRANCH. 


01211 










* 






01212A 


FD77 


FE 


F3A0 A 


CKOBRA LDX 


TRCADR 


X : = TRACE ADDRESS 


01213A 


FD7A 


E6 


00 


A 


LDAB 


0,X 
#$6E 


GET INSTR TO BE TRACED 


01214A 


FD7C 


CI 


6E 


A 


CMPB 


IS IT A JUMP, INDEXED? 


01215A 


FD7E 


27 


1A 


FD9A 


• BEQ 


JMPIDX 


YES, GO SIMULATE JUMP IDXED 


01216A 


FD80 


CI 


7E 


A 


CMPB 


#$7E 


JUMP, EXTENDED? 


01217A 


FD82 


27 


ID 


FDAl 


BEQ 


JMPEXT 




01218A 


FD84 


CI 


AD 


A 


CMPB 


#$AD 


JSR, INDEXED? 


01219A 


FD86 


27 


12 


FD9A 


BEQ 


JMPIDX 


(JUMP IDXED IS SAME AS 


01220 










* 




TRANSFER OF CONTROL) 


01221A 


FD88 


CI 


BD 


A 


CMPB 


#$BD 


JSR, EXTENDED? 


01222A 


FD8A 


27 


15 


FDAl 


BEQ 


JMPEXT 




01223A 


FD8C 


CI 


3B 


A 


CMPB 


#$3B 


RTI? 


01224A 


FD8E 


27 


15 


FDA5 


BEQ 


RTISIM 




01225A 


FD90 


CI 


39 


A 


CMPB 


#$39 


RTS? 


01226A 


FD92 


27 


16 


FDAA 


BEQ 


RTS SIM 




01227A 


FD94 


CI 


8D 


A 


CMPB 


#$8D 


BSR? 


01228A 


FD96 


27 


B6 


FD4E 


BEQ 


BRGO 


(BRANCH PROCESSING) 


01229 










* 






01230 










* NOT A BRANCH, JUMP, 


RTI, RTS 


01231 










* A REGISTER 


HOLDS # 


BYTES IN INSTRUCTION 


01232 










* 






01233A 


FD98 


20 


BD 


FD57 


BRA 


BRG1 


PUT IN NEW SWI AND 


01234 










* 




TRACE NEXT INSTRUCTION 


01235 










* 






01236 










* JUMP, JSR 


INDEXED SIMULATION 


01237 










* 






01238A 


FD9A 


A6 


01 


A 


JMPIDX LDAA 


i,x 


A : = ADDRESS OFFSET 


01239A 


FD9C 


30 






TSX 






01240A 


FD9D 


EE 


03 


A 


LDX 


3,X 


GET TARGET'S X REG 


01241A 


FD9F 


20 


B6 


FD57 


BRA 


BRG1 


UPDATE X, TRACE NEXT INSTR 


01242 










* 






01243 










* JUMP, JSR 


EXTENDED 




01244 










* 






01245A 


FDA1 


EE 


01 


A 


JMPEXT LDX 


i,x 


GET ADDRESS TO BE JUMPED TO 


01246A 


FDA 3 


20 


B4 


FD59 


BRA 


BRG2 


GO TRACE NEXT INSTR 


01247 










* 






01248 










* RTI ENCOUNTERED 




01249 










* 






01250A 


FDA5 


30 






RTISIM TSX 






01251A 


FDA6 


EE 


0C 


A 


LDX 


12, X 


GET P-COUNTER FROM STACK 


01252A 


FDA 8 


20 


AF 


FD59 


BRA 


BRG2 


GO TRACE NEXT INSTR. 


01253 










* 






01254 










* RTS ENCOUNTERED 




01255 










* 






01256A 


FDAA 


30 






RTS SIM TSX 






01257A 


FDAB 


EE 


07 


A 


LDX 


7,X 


GET RETURN P-REG FROM STACK 


01258A 


FDAD 


20 


AA 


FD59 


BRA 


BRG2 


GO TRACE NEXT INSTR 



93 



PAGE 038 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01260 

01261 

01262 

01263 

01264 

01265 

01266 

01267 

01268 

01269 

01270 

01271 

01272 

01273 

01274 

01275 

01276 

01277 

01278A 

01279A 

012 80 A 

01281A 

01282A 

01283 

012 84 A 

01285A 

01286 

01287A 

01288A 

01289 

01290 

01291 

01292 

01293 

01294 

01295A 

01296A 

01297A 

01298A 

01299A 

01300A 

01301A 

01302 

01303A 

01304 

01305A 



FDAF 
FDBO 
FDB1 
FDB2 
FDB3 

FDB4 
FDB7 

FDB9 
FDBB 



************************* 
* 

* OPBCYT 
* 

* THIS ROUTINE DETERMINES THE 

* IN AN INSTRUCTION 

* GIVEN ITS OP CODE. 
* 

* 
* 
* 
* 
* 
* 
* 

************************ 
* 



FDAF A 

16 
44 
44 
44 
44 

CE FDCD A 
8D B6 FD6F 

A6 00 A 
26 OF FDCC 



FDBD 
FDBF 
FDC1 
FDC3 
FDC5 
FDC7 
FDC9 

FDCB 
FDCC 



# OF BYTES 



INPUT: A HOLDS THE OP CODE 

OUTPUT: X HOLDS INDEX OF TABLE ELEMENT 
B NOT RESTORED 

A HOLDS # BYTES IN INSTRUCTION 

EXCEPT FOR BRANCHES IN WHICH CASE A IS NEGATIVE 



OPCBYT EQU 
TAB 
LSRA 
LSRA 
LSRA 
LSRA 

* 

LDX 
BSR 

* 

LDAA 
BNE 

* 
* 



B:= OP CODE 



PUT 4 UPPER BITS OF OP CODE INTO 
LOWER 4 BITS OF A 

#0 PBTTB X= ADDRESS OF TABLE 
INCX INC X TO POINT TO ENTRY 

0 , X GET TABLE ENTRY 

OPBTRT IF NOT 0 THEN NO FURTHER 
PROCESSING NEEDED 



* IF TOP 4 BITS » 8 OR C, THEN THERE ARE TWO CLASSES 

* OF INSTRUCTIONS: 2 BYTE INSTRUCTIONS AND 

* CE, 8C AND 8E WHICH ARE 3 BYTE INSTRUCTIONS 



86 02 A 
CI 8C A 
27 08 FDCB 
CI CE A 
27 04 FDCB 
CI 8E A 
2 6 01 FDCC 

4C 
39 



OPBT3 
* 



LDAA 


#2 


# BYTES IN MOST OF 8# INSTRUCTIOI 


CMPB 


#$8C 


3 BYTE INSTRUCTION? 


BEQ 


OPBT3 


YES, UPDATE A 


CMPB 


#$CE 


3 BYTE INSTR? 


BEQ 


OPBT3 


YES, UPDATE A 


CMPB 


#$8E 


3 BYTE INSTRUCTION? 


BNE 


OPBTRT 


NO, RETURN 


INCA 




# BYTES IN INSTRUCTION: =3 


RTS 




RETURN TO CALLER 



9^ 



PAGE 039 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01307 








* 










01308 








* OP 


CODE TO 


NUMBER 


OF BYTES CONVERSION TABLE 


01309 








* 










01310 








* 


1 


1 BYTES 


TOP 


4 BITS OF OPCODE 


01311 








* 










01312 








* 










01313 




FDCD 


A 


OPBTTB EQO 


* 






01314A 


FDCD 


01 


A 




FCB 


1 


0 




01315A 


FDCE 


01 


A 




FCB 


1 


1 




01316A 


FDCF 


82 


A 




FCB 


2+%10000000 


2 ( MINUS =" BRANCHES) 


01317A 


FDDO 


01 


A 




FCB 


1 


3 




01318A 


FDD1 


01 


A 




FCB 


1 


4 




01319A 


FDD 2 


01 


A 




FCB 


1 


5 




01320A 


FDD 3 


02 


A 




FCB 


2 


6 




01321A 


FDD4 


03 


A 




FCB 


3 


7 




01322A 


FDD5 


00 


A 




FCB 


0 


8 


# BYTES =2 EXCEPT 8C,8E 


01323A 


FDD6 


02 


A 




FCB 


2 


9 




01324A 


FDD7 


02 


A 




FCB 


2 


A 




01325A 


FDD 8 


03 


A 




FCB 


3 


B 




01326A 


FDD9 


00 


A 




FCB 


0 


C 


# BYTES =2 EXCEPT CE 


01327A 


FDDA 


02 


A 




FCB 


2 


D 




01328A 


FDDB 


02 


A 




FCB 


2 


E 




01329A 


FDDC 


03 


A 




FCB 


3 


F 





95 



8- %9 



PAGE 040 TVBUG46 .SA:0 TVBUG 1. 2 A VDG MONITOR FOR 6800, 01, 02, 03, 08 SYSTEM 



01331 








* 






01332 








* CONSTANT 


DATA 


01333 














01334A 


FDDD 


56 


A 


MCL2 


FCC 


/VDG DEBUG SYSTEM/ 


01335A 


FDED 


3B 


A 




FCC 


/; TV-BUG VER 1.2/ 


01336A 


FDFC 


0D 


A 




FCB 


$D 


01337A 


FDFD 


4D 


A 




FCC 


/ MOTOROLA- AUSTIN TEX/ 


01338A 


FE10 


04 


A 




FCB 


4 


01339A 


FE11 


43 


A 


MGL3 


FCC 


/CC B A X P 


01340A 


FE26 


04 


A 




FCB 


4 


01341A 


FE27 


OD 


A 


MCL4 


FCB 


$D 


01342A 


FE28 


42 


A 




FCC 


/BEG ADR? / 


01343A 


FE31 


04 


A 




FCB 


4 


01344A 


FE32 


45 


A 


MCL5 


FCC 


/END ADR? / 


01345A 


FE3B 


04 


A 




FCB 


4 


01346A 


FE3C 


20 


A 


NCHG 


FCC 


/ MEMORY BAD!/ 


01347A 


FE48 


04 


A 




FCB 


4 


01348A 


FE49 


OD 


A 


READY 


FCB 


$D 


01349A 


FE4A 


54 


A 




FCC 


/TVBUG/ 


01350A 


FE4F 


OD 


A 




FCB 


$D,4 


01351A 


FE51 


OD 


A 


OF SE T 


FCB 


$D 


01352A 


FE52 


4F 


A 




FCC 


/ OFFSET=/ 


01353A 


FE59 


04 


A 




FCB 


4 


01354A 


FE5A 


54 


A 


BADJP 


FCC 


/TOO FAR! / 


01355A 


FE62 


04 


A 




FCB 


4 


01356A 


FE63 


OD 


A 


FILLMS 


FCB 


$D 


01357A 


FE64 


43 


A 




FCC 


/CHAR?/ 


01358A 


FE69 


04 


A 




FCB 


4 


01359 








* 







S/ 



PAGE 041 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01361 

01362 

01363 

01364 

01365 

01366 

01367 

01368A 

01369A 

01370A 

01371A 

013-72A 

01373A 

01374A 

01375A 

01376A 

01377A 

01378A 

01379 

01380 

01381 

01382A 

01383A 

01384A 

01385A 



FE6A 37 
FE6B FE 
FE6E 8D 
FE70 36 
FE71 86 
FE73 C6 
FE75 BD 
FE78 8B 
FE7A BD 
FE7D 5A 
FE7E 26 



CF 
04 

FF7F 
10 

FF53 



FE80 32 
FE81 BD FF7F 
FE84 33 
FE85 39 



********** 

* A,B UNCHANGED, X= (NEXTBY) 

* SAVE CHARACTER AT LOCATION 

* (NEXTBY) 

* FLASH THE LOCATION (4 COLORS) 

* REPLACE THE CHAR & RETURN 
********** 



BLINK 



F3CC A 
16 FE86 



A 
A 
A 
A 
A 



INC1 



F5 FE75 



PSHB 

LDX 

BSR 

PSHA 

LDAA 

LDAB 

JSR 

ADDA 

JSR 

DECB 

BNE 



NEXTBY 
SYNCLD 

#$CF 
#4 

SAVE 
#$10 
WAITFS 

INC1 



BLINK CURSOR 



* REPLACE CHARACTER 
* 



PULA 
JSR 
PULB 
RTS 



SAVE 



$-4! 



PAGE 042 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01387 ********** 

01388 * B,X UNCHANGED 

01389 * MASK INTERRUPT BEFORE LOAD 

01390 * & UNMASK AFTER 

01391 * WAIT FOR LEADING EDGE 

01392 * OF HORIZONTAL SYNC THEN 

01393 * LOAD A FROM LOCATION 0,X 

01394 ********** 
01395A FE86 OF SYNCLD SEI 

01 3 96 A FE87 B6 F406 A SLD1 LDAA PIABD 

01397A FE8A 2A FB FE87 BPL SLD1 

013 98 A FE8C B6 F406 A SLD2 LDAA PIABD 

013 9 9 A FE8F 2B FB FE8C BMI SLD2 

01400 * 

01401 * NOW CAN LOAD 

01402 * 

01403A FE91 A6 00 A LDAA 0,X 

01404A FE93 0E CLI 

01405A FE94 39 RTS 



9% 



PAGE 043 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01407 








u x *± u o 








01 40 Q 








01 41 n 








01411 

U X 411 








01412 








01413 








01414 








01415 

w JU1X J 








01416 

ux txu 








01 41 7 

Vlll / 








01-41 ft 








ni A^ q 
U JL4X y 
















0 1 49 1 A 


£ £ijj 


1 7 
D / 






TPTPQ a 

£ sLy o 


JO 




UX4ZDA 


TP TP O "7 


I? c 
£ O 


tp a ft a tv 
F4Uo A 


01 494 








01 A 9 5A 
U14Z DA 


TpT?Q A 


D O 




HI A9 £ A 
Oil 


FFQ T* 


9 A 
Z ft 


ft o tptptv a 

U j £ Hi A O 


01 427A 

Uliti /A 


FFQH 


17 
d / 




01 49ftA 


FFQ 1? 
r JCi .7 XL 


ft6 

O 17 


F 0 A 
JZi U A 


Ux ffcZ 


tptptv n 

£ £xAU 


n £ 


TPTP 7V 
£ £ A 


01 410A 
UIIj UA 


£ J&AZ 


on 

DU 


TP TP £ A TV 

£ £ Oft A 


Ux fftOXA 


TP T?7\ C 
£ JZiAD 


l Q 




ni ^7o 








01 4112V 


FFA £ 
£ Hi AO 


D O 




fi1 A 1 A A 


TP T7 7\ "7 
£ £*A / 


Z 4 


AO TP TPTS 1 

Uo FEB1 


01 4mA 

UX ft O DA 


FFAQ 


1 7 
d / 




01436A 


PEA A 


86 


20 A 


01437A 

vxt j / rik 


FFAP 


5F 

-JE 




01418A 

v/x •* J OA 


FFAD 


DH 
DLf 


FF64 A 
£ £ Oft A 


01439A 


FEBO 


33 




01440 








01 441 A 


FFT* 1 


DO 




01442A 


FE1*2 


24 


OF FFC2 


01 441A 


FFR4 


O vj 


f ipn a 


ni aaaa 

UX ft ft ft A 


£ Xj-D / 


Oft 


1 TP A 

x£ A 


01445A 

v/x *x *± Jn 


FF"RQ 


2 7 


U / £ XuwZ 


01 AAfi A 
UX ft ft OA 


FFTJT1 
£ £iJ3X3 


FF 
£ Hi 


tp inn 7v 
£ A 


H1 AA7A 
Ul^ft /A 


Til TPT1 TI* 
£ £*£>£* 


no 
uy 




01 44ftA 

UX ft ft OA 


tp tptj tp 

£ £iJD£ 


FT? 
£ £ 


£ A 


01 AAQ 
Uxft ft y 








ft1 A £ftiv 
U14DUA 


tpt*v* o 

£ £iLZ 


DO 




01 451 A 

\J JLt J X A 


FFP1 


94 


1 n FFHR 

X U £ EiLJD 


01 4R9A 
UX 4 J4n 


£ £A*D 


DO 


TP Opn TV 
£ XU A 


H1 A £1 TV 


TP TP/"* O 

r £iCo 


Q TV 

oA 


TP A TV 

EU A 


01 454A 

UX *x Dft A 


FFP A 

£ JEiV*A 


ft1 
ox 


FF A 
£ £ A 


01 A 5 5 A 


£ £iV^W 


97 
Z / 


ft 7 FFn*% 
U / £ XjL/O 


ni it;c& 


£ HiUiti 


TP TP 
£ £i 


tp inn a 
£ JUL- A 


01457A 

V X t -J 1 A 


FFH1 

£ CiUx 


Oft 

u o 




01 45ftA 

Uxft J OA 


FFFl9 


FF 
£ £ 


f ir 1 /" 1 a 

£ jLL A 


Ux4D:J 








01460A 


FEDS 


56 




01461A 


FED6 


24 


03 FEDB 


01462A 


FED8 


CE 


0000 A 


01463A 


FEDB 


32 




01464A 


FEDC 


33 





********** 



A,B UNCHANGED 
IF HOME KEY CLOSED 

THEN ADR OF DISPLAY TO (NEXTBY) 
IF UP CLOSED 

THEN 2'S COMP OF 32 TO A,B & 
CALL UPDOWN 
IF DOWN KEY CLOSED 

THEN 32 TO A,B & CALL UPDOWN 
IF RIGHT KEY CLOSED 

THEN INCREMENT (NEXTBY) TO MARGIN 
IF LEFT KEY CLOSED 

THEN DECREMENT (NEXTBY) TO MARGIN 



* 

* 
* 
* 
* 
* 
* 
* 
* 

********** 

CURSOR 



*CHECK 



♦CHECK 
CUR1 



♦CHECK 
CUR2 



♦CHECK 
CUR 3 



♦CHECK 
CUR4 

CUR5 



99 



PSHB 




PSHA 




LDAB 


PIABD 


UP ARROW 


RORB 




BCC 


CUR1 


PSHB 




LDAA 


#$E0 


LDAB 


#$FF 


JSR 


UPDOWN 


PULB 




DOWN 


ARROW 


RORB 




BCC 


CUR2 


PSHB 




LDAA 


#$20 


CLRB 




JSR 


UPDOWN 


PULB 




LEFT 


ARROW 


RORB 




BCC 


CUR 3 


LDAA 


NEXTBY+1 


ANDA 


#$1F 


BEQ 


CUR3 


LDX 


NEXTBY 


DEX 




STX 


NEXTBY 


RIGHT ARROW 


RORB 




BCC 


CUR4 


LDAA 


NEXTBY+1 


ORAA 


#$E0 


CMPA 


#$FF 


BEQ 


CUR4 


LDX 


NEXTBY 


INX 




STX 


NEXTBY 


HOME 


KEY 


RORB 




BCC 


CUR5 


LDX 


fVDGRAM 


PULA 




PULB 




i 


1-4$ 



-32 



+ 32 



PAGE 044 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 

01465A FEDD FF F3CC A STX NEXTBY 

01466A FEEO 3 9 RTS 



/oo 



PAGE 045 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01468 

01469 

01470 

01471 

01472A 

01473A 

01474A 

01475A 

01476A 

01477 

01478 

01479A 

01480A 

01481A 

01482A 

01483 

01484 

01485 

01486A 

01487A 

01488 

01489A 

01490A 

01491A 

01492A 

01493 

01494 

01495 

01496 

01497 

01498 

01499 

01500 

01501A 

01502A 

01503A 

01504A 

01505A 

01506A 

01507 

01508A 



FEE1 
FEE4 
FEE5 
FEE7 
FEE9 



FEEC 
FEEF 
FEF1 
FEF4 



FEF6 
FEF8 

FEFA 
FEFD 
FEFF 
FFOO 



* NOW CHECK KEYBOARD 

* ON EXIT INPUT CHAR IN A-REG 

* X,B UNCHANGED 

FF F3CA A INCH1 STX SAVEX 
37 PSHB 
8D 83 FE6A INCH0 BSR BLINK 
8D AC FE95 BSR CURSOR 

FE F3CA A LDX SAVEX 



FLASH CURSOR 



B6 F404 A LDAA PIAAD 

2B 10 FF01 BMI NONE 

Bl F3D7 A CMPA FLAGK 

27 OE FF04 BEQ SAME 



LOOK FOR ANY KEY 

SAME KEY 

FROM LAST TIME? 



* CHECK FOR ESCAPE FUNCTION 



81 IB A 
27 12 FF0C 

B7 F3D7 A 
8D 10 FF0F 
33 
39 



CMPA 
BEQ 

STAA 
BSR 
PULB 
RTS 



#$1B 
CNTLEV 

FLAGK 
OUTCH1 



ECHO CHAR 



FF01 
FF04 
FF05 
FF08 
FF0A 
FFOB 



7F F3D7 A 
OC 

BD F390 A 
24 DB FEE 5 
33 
39 



* NO KEY CLOSED NOW GO TO USER ROUTINE 

* IF USER HAS KEY DOWN 

* RETURN WITH CHAR IN A REG 

* WITH CARRY = 1 

* ELSE RETURN WITH CARRY =0 
* 

NONE 
SAME 



CLR 
CLC 
JSR 
BCC 
PULB 
RTS 



FLAGK 

USRINP 
INC HO 



FF0C 7E FB20 A CNTLEV JMP 



CONTRL 



1*1 



PAGE 046 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



A 1 C1 A 

01510 










********** 




A 1 C 1 1 

01511 










* A,B,X UNCHANGED 


01512 










* IGNORES LF 




A 1 C 1 *3 

0151 o 










* CALLS "RETURN" IF C.R. 


A 1 C 1 A 

01514 










* CALLS "INIT" 


1 IF FORM FEED 


A1 CI C 

01515 










* CALLS "SCROLL" IF BOTTOM 


01516 










* OF DISPLAY RAM IS EXCEEDED 


01517 










* ELSE STORES 


CHAR 


A 1 C 1 O 

01518 










********** 




01519A 


FF0F 


37 






OUTCH1 PSHB 




01520A 


FF10 


36 






PSHA 




01-52 1A 


F r 11 


FF 


F3CA A 


STX 


SAVEX 


A 1 CO*"* 

01 522 










* 




01523 










* 




A 1 OA 

01524 










* CHECK IF END OF DISPLAY BUFF IF YES THEN SCROLL 


01525 










* 




01526A 


FF14 


FE 


F3CC A 


MA INI LDX 


NEXTBY 


A 1 C O 1 1\ 

01527A 


FF17 


oC 


D200 A 


CPX 


#VDGRAM+512 


01528A 


FF1A 


26 


03 


FF1F 


BNE 


MA IN 2 


01529A 


FF1C 


BD 


FFC9 A 


JSR 


SCROLL 


A 1 C O A 

01530 










* 




01531 










* CHECK FOR C. 


,R. IF YES THEN FINISH LINE WITH BLANKS 


01532 










* TRAP L.F. 'S 




01533 










* 




01534A 


FF1F 


81 


OA 


A 


MAIN 2 CMPA 


#$0A 


01535A 


FF21 


27 


25 


FF48 


BEQ 


MAIN 6 


A1 COCn 

0153 oA 


FF23 


81 


0D 


A 


CMPA 


#$D 


01537A 


TIT""! *"> C 

FF25 


26 


06 


FF2D 


BNE 


MAIN 3 


01538A 


FF27 


8D 


67 


FF90 


BSR 


RETURN 


A 1 C *i A n 

01539A 


FF29 


86 


OA 


A 


LDAA 


#$0A 


01540A 


FF2B 


20 


E7 


FF14 


BRA 


MA INI 


01541 










* 




01542 










* 




A 1 C A O 










* CHECK FOR FORM FEED IF YES CLEAR SCREEN 


01544 










* 




01545A 


FF2D 


81 


0C 


A 


MAIN 3 CMPA 


#$oc 


0154 6A 


FF2F 


26 


04 


FF35 


BNE 


MAIN4 


01547A 


FF31 


8D 


75 


FFA8 


BSR 


INIT 


0154 8A 


FF33 


20 




FF48 


BRA 





ioz. 



PAGE 047 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01550 

01551 

01552 

01553 

01554A 

01555A 

01556A 

01557A 

01558A 

01559A 

01560A 

01-561A 

01562 

01563 

01564 

01565 

01566A 

01567A 

01568A 

01569A 

01570A 

01571A 

01572 

01573 

01574 

01575 

01576A 

01577 



* CHECK FOR BACKSPACE IF YES MOVE POINTR BACK 

* & STORE INVERTED BLANK 
* 



FF35 
FF37 
FF39 
FF3C 
FF3E 
FF3F 
FF41 
FF43 



81 08 



A MAIN 4 CMPA 



26 0C FF45 
8C D000 A 

27 OA FF48 
09 

86 60 A 
8D 3C FF7F 
20 03 FF48 



BNE 

CPX 

BEQ 

DEX 

LDAA 

BSR 

BRA 



#$08 
MAIN 5 
#VDGRAM 
MA IN 6 

#$60 
SAVE 
MAIN 6 



* GET HERE TO SAVE THE BEGGAR.. THEN HOME 
* 

* 



FF45 
FF47 
FF48 
FF4B 
FF4E 
FF4F 



FF45 A MAIN 5 EQU 
8D 38 FF7F BSR SAVE 

08 INX 

FF F3CC A MAIN 6 STX NEXTBY 

FE F3CA A f^AlA)7 LDX SAVEX 

32 PULA 

33 PULB 



* NOW GO TO USERS DISPLAY ROUTINE 
♦....NOTE USER MUST EXECUTE A RTS 

* AS LAST INS 

A JMP USROUT 



FF50 7E F393 



3-4-7 

lot 



PAGE 048 TVBUG46 .SA:0 TVBDG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01579 ********** 

01580 * A,B,X UNCHANGED 

01581 * WAIT FOR LEADING EDGE OF 

01582 * FIELD SYNC (VERTICAL SYNC) 

01583 * THEN EXIT 

01584 ********** 

01585 FF53 A WAITFS EQU * 
01586A FF53 37 PSHB 
01587A FF54 F6 F406 A WAIT 2 LDAB PIABD 
01588A FF57 58 ASLB 

015 89A FF58 58 ASLB 

01590A FF59 24 F9 FF54 BCC WAIT 2 

01591 * GET NEG EDGE 

01592A FF5B F6 F406 A WAITl LDAB PIABD 

01593A FF5E 58 ASLB 

01594A FF5F 58 ASLB 

01595A FF60 25 F9 FF5B BCS WAITl 

01596A FF62 33 PULB 

01597A FF63 39 RTS 



3-^8 

lot/ 



PAGE 049 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01599 

01600 

01601 

01602 

01603 

01604 

01605 

01606 

01607 

01608 

01609 

01-610 

01611A 

01612A 

01613 

01614A 

01615A 

01616 

01617A 

01618A 

01619A 

01620A 

01621 

01622A 

01623A 

01624 

01625A 



********** 



FF64 BB F3CD 
FF67 F9 F3CC 

FF6A B7 F3C7 
FF6D F7 F3C6 



FF70 CI DO A 
FF72 2D OA FF7E 
FF74 CI D2 A 
FF76 2C 06 FF7E 



FF78 FE F3C6 
FF7B FF F3CC 



ALL REGS ZAPPED 
ON ENTRY A,B CONTAIN OFFSET 

TO BE ADDED TO (NEXTBY) 
OFFSET WILL BE ADDED ONLY 
IF RESULT LOCATION WILL 
BE IN ACTIVE AREA OF 
DISPLAY RAM 
ON EXIT A,B CONTAIN RESULT 
X = (NEXTBY) IF OK TO ADD 
X - X(N-l) IF NOT OK TO ADD 



NEXTBY+1 
NEXTBY 

TEMP+1 
TEMP 



FF7E 39 



* 
* 
* 
* 
* 
* 
* 
* 
* 
* 

********** 

A UPDOWN ADDA 

A ADCB 
* 

A STAA 

A STAB 
* 

A CMPB 
BLT 
CMPB 
BGE 
* 

A LDX 
A STX 
* 

UD0 RTS 



#VDGRAM/256 
UD0 

#(VDGRAM+512)/2 56 
UD0 



TEMP 
NEXTBY 



OK TO ADJUST 



/05 



PAGE 050 TVBUG46 .SA:0 



TVBOG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01627 * 

01628 * 

01629 * SAVE. . .COPIES BYTE 

01630 * WAITS FOR HORIZ SYNC THEN STORES IN 

01631 * DISPLAY RAM 

01632 * NO REG KLOBBERED 

01633 * ON ENTRY X REG POINTS TO LOG 

01634 * IN DISPLAY MEMORY TO STORE CHAR 

01635 * INTERRUPT IS MASKED BEFORE WRITE 
01636. * TO VDG MEMORY THEN ON MASKED 

01637 * (WE MUST WRITE DURING TV HORIZ RETRACE) 

01338 * 

01639 * 

01640A FF7F 37 SAVE PSHB 

01641A FF80 OF SEI 

01642 * 

01643A FF81 F6 F406 A SAVE0 LDAB PIABD WAIT FOR HS=1 

01644A FF84 2A FB FF81 BPL SAVE0 

01645 * 

0164 6A FF86 F6 F406 A SAVE1 LDAB PIABD NEGATIVE EDGE 

0164 7A FF89 2B FB FF86 BMI SAVE1 

01648 * - 

01649 * NOW CAN SAVE ( SCREEN BLANKED) 

01650 * 

01651A FF8B A7 00 A STAA 0,X 

01652A FF8D 0E CLI 

01653A FF8E 33 PULB 

01654A FF8F 39 RTS 



g- So 

/06 



PAGE 051 TVBUG46 .SA:0 TVBOG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01656 

01657 

01658 

01659 

01660 

01661 

01662 

01663 

01664 

01665 

01666A 

01667 

01668A 

01669A 

01670A 

01671 

01672 

01673 

01674A 

01675A 

01676A 

01677A 

01678A 

01679A 

01680A 

01681A 

01682 



********** 



* 
* 
* 
* 
* 
* 
* 
* 



A,B UNCHANGED 

FILLS CURRENT LINE WITH 

BLANKS FROM CURRENT 

POSITION (NEXTBY) TO 

END OF LINE 
POINTER (NEXTBY) SET TO 

START OF NEXT LINE 
ON EXIT X = (NEXTBY) 



FF90 FE F3CC 



********** 

A RETURN LDX 
* 



FF93 36 
FF94 86 
FF96 8D 



FF98 08 
FF99 FF 
FF9C B6 
FF9F 84 
FFA1 26 
FFA3 FF 
FFA6 32 
FFA7 3 9 



60 A RET1 
E7 FF7F 



PSHA 
LDAA 
BSR 



NEXTBY 



#$60 
SAVE 



* CONTINUE TO END OF LINE 
* 



F3C6 A 
F3C7 A 
IF A 
Fl FF94 
F3CC A 



INX 

STX 

LDAA 

ANDA 

BNE 

STX 

PULA 

RTS 



TEMP 

TEMP+1 

#$1F 

RET1 

NEXTBY 



A57 



PAGE 052 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01684 

01685 

01686 

01687 

01688 

01689 

01690 

01691 

01692 

01693 

01694A 

016 95 A 

01696A 

01697 

01698A 

016 9 9A 

01700A 

01701 

01702 

01703 

01704 

01705A 

0170 6A 

01707A 

01708 

01709A 

01 71 OA 

01711A 

01712A 

01713A 

01714A 



********** 



FFA8 7F 
FFAB 7F 
FFAE 7F 

FFB1 36 
FFB2 86 
FFB4 B7 



FFB7 CE 
FFBA 86 
FFBC FF 

FFBF 8D 
FFC1 08 
FFC2 
FFC5 
FFC7 32 
FFC8 39 



04 

F407 



* 

* 
* 

* 



A,B UNCHANGED 

PIA (ASCII KEYBOARD & VDG) 

IS CLEARED, SET FOR INPUT 

& SET FOR DATA REG ACCESS 
ENTIRE SCREEN (512 BYTES) + 

ADDITIONAL 512 BYTES ARE 

FILLED WITH BLANKS 
ON EXIT X = (NEXTBY) 



F407 A INIT 
F406 A 
F3D7 A 



A 
A 



********** 

CLR PIABC 

CLR PIABD 

CLR FLAGK 



PSHA 

LDAA #$4 
STAA PIABC 

* 
* 

* NOW BLANK SCREEN 
* 



POINT AT DATA REG 



8C 
26 



D000 A 
60 A 
F3CC A 

* 

BE FF7F INIT1 

D400 A 
F8 FFBF 



LDX #VDGRAM 
LDAA #$60 
STX NEXTBY 



BSR 

INX 

CPX 

BNE 

PULA 

RTS 



SAVE 

#VDGRAM+1024 
INIT1 



PAGE 053 TVBDG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01716 

01717 

01718 

01719 

01720 

01721 

01722 

01723 

01724 

01725A 

01726 

01727A 

01728 

01729A 

01730A 

01731A 

01732A 

01733 

01734A 

01735A 

01736 

01737A 

01738A 

01739A 

01740A 

01741A 

01742A 

01743 

01744A 

01745A 

01746A 

01747A 

01748A 



********** 



FFC9 3 6 

FFCA CE D00O A 



A,B UNCHANGED 
MOVES EACH CHAR OP 1 LINE 

(32 LOCATIONS) 
TOP LINE IS LOST 
BOTTOM LINE IS BLANK ON EXIT 
(NEXTBY) IS DECREMENTED BY 32 
ON EXIT X = (NEXTBY) 



* 
* 
* 
* 
* 
* 
* 

********** 

SCROLL PS HA 



FFCD 37 
FFCE OF 

FFCF F6 F406 A 
FFD2 2A FB FFCF 

FFD4 F6 F406 A 
FFD7 2B FB FFD4 

FFD9 A6 20 A 
FFDB 8D A2 FF7F 
FFDD 08 

FFDE 8C D200 A 
FFE1 26 EC FFCF 
FFE3 CE D1E0 A 

FFE6 0E 

FFE7 FF F3CC A 
FFEA 33 
FFEB 32 
FFEC 39 



LDX 

* 

PSHB 
SEI 
SCROL3 LDAB 
BPL 

* 

SCROL4 LDAB 
BMI 

* 

LDAA 

BSR 

I NX 

CPX 

BNE 

LDX 

* 

CLI 

STX 

PULB 

PULA 

RTS 



#VDGRAM 



PIABD 
SCROL3 

PIABD 
SCROL4 

32, X 
SAVE 

#VDGRAM+512 
SCROL3 
#VDGRAM+4 80 



NEXTBY 



PAGE 054 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01, 02,03,08 SYSTEM 

01750 * 

01751 * 

01752A FFED 0D A HE ADM S FCB $D 
01753A FFEE 4E A FCC /NAME? / 

01754A FFF4 04 A FCB 4 



PAGE 055 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01756 * 

01757 * 

01758 * INTERRUPT VECTORS 

01759 * 

01760A FFF8 ORG BASORG+$7F8 

01761A FFF8 F824 A FDB IO 

01762A FFFA F82E A FDB SFEI 

01763A FFFC F829 A FDB POWDWN 

01764A FFFE FAD 7 A FDB START 



PAGE 056 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800, 01, 02, 03, 08 SYSTEM 



01766 

01767 

01768 

01769 

01 77 OA 

01771A 

01772A 

01773 

01774 

01775 

01776 

01-777 

01778A 

01779A 

01780A 

01781A 

01782A 

01783A 

01784A 

01785A 

01786 

01787 

01788 

01789 

01790 . 

01791 

01792 

01793A 

01794A 

01795 

017 96 A 

01797A 

01798A 

01799 

01800 

01801 

01802 

01803 

01804 

01805 



* RAM SCRATCHPAD FOR TVBUG. .+ STACK 
* 



F000 
F000 
F36F 



F37A 
F37C 
F37E 
F380 
F382 
F384 
F386 
F388 



F390 
F393 

F396 
F399 
F39C 



ORG 



$F000 



A *3 CO 


A 




RMB 


O 1 Q 


A A At* 

000B 


A 


STACK 
* 


RMB 


11 


0008 


A 


NBRBPT 
+ 


EQO 


8 






*THE FOLLOWING 
* 


1 ARE 


0002 


A 


IOV 


RMB 


2 


0002 


A 


BEGA 


RMB 


2 


0002 


A 


ENDA 


RMB 


2 


0002 


A 


NIO 


RMB 


2 


0002 


A 


SP 


RMB 


2 


0002 


A 


SWI1 


RMB 


2 


0002 


A 


SWI2 


RMB 


2 


0008 


A 


BRINS 


RMB 


8 



# OF BREAKPOINTS 



I/O INTERRUPT POINTER 
PRINT/PUNCH START LOC 
PRINT PUNCH STOP LOC 
NMI INTERRUPT POINTER 
USER STACK POINTER 
LEVEL 1 SWI VECTOR 
LEVEL 2 SWI VECTOR 
COND BRANCH STORAGE 



* 
* 

* 

* 
* 



USER I/O VECTORS 
INITALIZED TO RTS 
USER MUST END HIS ROUTINES 
WITH RTS OR ALL IS LOST! I ! I 



0003 


A 


USRINP 


RMB 


3 USER INPUT ROUTINE 


0003 


A 


USROUT 
* 


RMB 


3 USER OUTPUT ROUTINE 


0003 


A 


USR1 


RMB 


3 


0003 


A 


USR2 


RMB 


3 


0004 


A 


USR3 
* 


RMB 


4 






* A 16 


BYTE 


PROM MAY BE PATCHED 






* OVER 


THE 


ABOVE 16 LOCATIONS. 






* USER 


VECTORS WILL THEN BE 






* AVAILABLE 
* 


AT POWER ON. 


F3A0 


A 


BRANEN 


EQU 


* 



PAGE 057 TVBDG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 



01807 








* 








01808 








* THE FOLLOWING ARE INITALIZED TO ZERO 


01809 








it 








01810 








it 








01811A 


F3A0 


0002 


A 


TRCADR 


RMB 


2 


TRACE ADDRESS 


01812A 


F3A2 


0001 


A 


TRCINS 


RMB 


1 


PP CODE REPLACED BY TRACE 


01813A 


F3A3 


0002 


A 


NT RACE 


RMB 


2 


NO OF INS TO TRACE 


01814 








* 








01815A 


F3A5 


0010 


A 


BRKADR 


RMB 


NBRBPT*2 


BREAKPOINT TABLE 


01816A 


F3B5 


0010 


A 


BRKINS 


RMB 


NBRBPT*2 


OP CODES FOR BREAK 


01817 








* 








UloloA 


F 3C5 


A A A 1 

0001 


A 


ASAVE 


RMB 


i 




01819A 


F3C6 


0002 


A 


TEMP 


RMB 


2 




01820A 


F3C8 


0002 


A 


TEMP2 


RMB 


2 




01821A 


F3CA 


0002 


A 


SAVEX 


RMB 


2 




01822A 


F3CC 


0002 


A 


NEXTBY 


RMB 


2 




01823A 


F3CE 


0001 


A 


XHI 


RMB 


1 




01824A 


F3CF 


0001 


A 


XLOW 


RMB 


1 




01825A 


F3D0 


0002 


A 


SSAVE 


RMB 


2 




01826A 


F3D2 


0001 


A 


CHRCNT 


RMB 


1 




01827A 


F3D3 


0001 


A 


TERMCH 


RMB 


1 




01828A 


F3D4 


0001 


A 


VFLAG 


RMB 


1 




01829A 


F3D5 


0002 


A 


OFF ADR 


RMB 


2 




01830A 


F3D7 


0001 


A 


FLAGK 


RMB 


1 




01831A 


F3D8 


0001 


A 


BRKSIN 


RMB 


1 


1=BREAKS IN USER CODE 


01832A 


F3D9 


0001 


A 


BRKTRC 


RMB 


1 


l=P-COUNTR IS AT BREAKPOINT 


01833 








* 




& USER WANTS TO CONTINUE 


01834 








* 




ONE TRACE WILL BE DONE 


01835 








* 




& BREAKS 


RESTORED 


01836 




F3DA 


A 


ENDIN0 


EQU 


* 




01837A 


F3DA 


0020 


A 


HEADBF 


RMB 


32 





PAGE 058 TVBDG46 .SA:0 TVBUG 1. 2 A VDG MONITOR FOR 6800, 01, 02, 03, 08 SYSTEM 

01839 END 
TOTAL ERRORS 00000 — 00000 



F409 ACIAD 00079*00508 01044 

F408 ACIAS 00078*00079 00464 00505 00670 00989 01040 
FA6B ADDOFF 00488 00567* 
F872 ADRSTR 00170*00637 

F3C5 ASAVE 00830 00836 00859 00878 00901 01818* 
F8AB ASCII 00211 00218* 
- F936 BAD0 00314*00340 
F957 BAD1 00335*00339 
F963 BAD 2 00321 00325 00327 00342* 
F951 BAD3 00323 00330* 

F929 BADDR 00091 00257 00280 00308*00358 00363 00460 00528 00537 00725 
FB44 BADDRJ 00725*00737 00750 00758 00784 
FE5A BADJP 00624 01354* 
F800 BASORG 00084*01760 

F37C BEGA 00204 00207 00220 00237 00259 00275 00281 00285 00359 00484 004 

00487 00604 00605 01001 01003 01014 01017 01022 01025 01779* 
F9D3 BILD 00465*00467 00471 00475 00499 
FBC1 BKCON1 00859*00912 

FBCE BKCON2 00870*00896 00904 00919 00927 00930 00934 

FBD0 BKCON3 00872*00945 

FBDF BKDONE 00846 00885* 

FBDC BKPOT 00879 00881* 

FE6A BLINK 01368*01474 

F3A0 BRANEN 00643 01805* 

F87D BRG 00175 00177* 

FD57 BRG1 01182*01233 01241 

FD59 BRG 2 01184*01198 01246 01252 01258 

FD4E BRGO 00177 01177*01228 

FD69 BRGO DC 01181 01195*01197 

F388 BRINS 01152 01166 01785* 

F3A5 BRKADR 00832 01815* 

FD0C BRKINH 00173 01098 01115* 

F3B5 BRKINS 00872 01816* 

FBAF BRKLP 00836*00873 

F3D8 BRKSIN 00840 00881 01831* 

FBA6 BRKSUB 00592 00732 00752 00761 00828*01080 01136 

F3D9 BRKTRC 00772 00789 01128 01134 01832* 

FD4A BRNOGO 00176 01171* 

FB49 BSRBRK 00732*00740 00746 

F926 C3 00232 00262 00287 00295* 

FA65 C5 00476 00553 00559*00621 00623 00626 

FA29 CHANGE 00138 00528* 

FA2C CHG0 00529*00550 00556 

FA27 CHK1 00519 00521* 

FA1A CHKESC 00504 00515*01039 

F3D2 CHRCNT 00313 00315 00540 01013 01020 01826* 

FD77 CKOBRA 01155 01172 01212* 

FC0B CLRBRK 00863 00932* 

FF0C CNTLEV 01487 01508* 

FBA3 CNTRL2 00733 00802* 

FB90 CONT 00130 00789* 

FD37 CONTRC 00780 01151* 

FB20 CONTRL 00099 00185 00186 00187 00295 00559 00690*00715 00802 01033 011 



PAGE 059 TVBUG46 . SA: 0 TVBOG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTEM 







01508 






FDOP 


CTRL 


01117 


*01147 




FEA6 


CUR1 


01426 


01433* 




FEB1 


CUR2 


01434 


01441* 




FEC2 


COR3 


01442 


01445 


01450* 


FEDS 


CUR4 


01451 


01455 


01460* 


FEDB 


COR5 


01461 


01463* 




FE95 


CURSOR 


01421 


*01475 




FB47 


DELBRK 


00132 


00731* 




F88F 


DISPLY 


00156 


00201* 




F37E 


END A 


00210 


00231 


00261 






01780 


* 




F3DA 


ENDIN0 


00651 


01836* 




FAF3 


ESC1 


00520 


00664* 




F900 


FAST0 


00274 


♦00290 




F90B 


FASTI 


00280 


*00289 




F8FE 


FASTLD 


00154 


00272* 




F833 


FCTABL 


00119 


*00707 




F872 


FCTBEN 


00163 


*00713 




F8E3 


FILL 


00158 


00254* 




F8F4 


FILL0 


00261 


*00265 




FE63 


FILLMS 


00255 


01356* 




F3D7 


FLAGK 


01481 


01489 


01501 


FBFD 


FNDRPL 


00860 


00925* 




F96C 


GET ADR 


00096 


00201 


00254 


FB40 


GOODCH 


00709 


00718* 




FB61 


GOTO 


00134 


00758* 




F3DA 


HEADBF 


00976 


00994 


01837* 


FFED 


HEADMS 


00974 


01752* 




FE75 


INC1 


01374 


*01378 




FEE5 


INCH0 


01474 


*01504 




FEE1 


INCH1 


00088 


00238 


00314 


FD07 


INCNOV 


01104 


01107* 




FD6F 


INCX 


01182 


01202* 


01285 


FD76 


INCXR 


01203 


01207* 




FADD 


INILP1 


00640 


*00644 




FAE6 


INILP2 


00649*00652 




FFA8 


INIT 


00095 


00294 


00680 i 


FFBF 


INIT1 


01709 


*01712 




FD72 


INXLP 


01204*01206 




F824 


10 


00103 


*01761 




F37A 


IOV 


00103 


01778* 




FDA1 


JMPEXT 


01217 


01222 


01245* 


FD9A 


JMPIDX 


01215 


01219 


01238* 


FCBA 


KC1 


01039 


*01043 




FA0E 


KCIN 


00466 


00480 


00483 


FCB9 


KCOUT 


00993 


00999 


01007 i 


F421 


KEYAC 


00065*00666 




F420 


KEYAD 


00064*00065 


00066 i 


F423 


KEYBC 


00067*00667 




F422 


KEYBD 


00066 


* 




FBE3 


LN 


00838 


00895* 


• 


F9C0 


LOAD 


00136 


00455* 




F9C3 


LOADO 


00441 


00458* 




FA04 


LOAD1 


00492 


00494* 




FA60 


LOAD 19 


00495 


00545 


00557* 


FF14 


MA INI 


01526 


*01540 




FF1F 


MAIN 2 


01528 


01534* 





00261 00286 00365 00602 00603 00972 01000 01002 01C 



01696 01830* 
00272 00356*00598 00970 



00700 00977 01472* 



01547 01694* 



00485 
01030 

00067 



00490 00504*00507 
01038*01059 01066 



US 



PAGE 060 TVBOG46 .SA:0 TVBOG 1.2 A VDG MONITOR FOR 6800,01, 02, 03,08 SYSTEM 



FF2D MA IN 3 01537 01545* 
FF35 MAIN 4 01546 01554* 
FF45 MAIN 5 01555 01565* 

FF48 MAIN 6 01535 01548 01557 01561 01568* 

FDDD MCL2 00681 01334* 

FE11 MCL3 00799 01339* 

FE27 MCL4 00356 01341* 

FE32 MCL5 00361 01344* 

F8C9 MORE 00234* 

FD2B NBKTRC 01130 01143* 

0008 NBRBPT 00851 00916 01774*01815 01816 
' FE3C NCHG 00557 01346* 
F8B5 NEWCHR 00223*00236 
F892 NEWLIN 00203*00239 
FB73 NEXT 00140 00771* 

F3CC NEXTBY 01369 01443 01446 01448 01452 01456 01458 01465 01526 01568 016 

01612 01623 01666 01679 01707 01745 01822* 
F380 NIO 00108 00684 01781* 
FA88 NMI 00586*00683 
FBF1 NOBRIN 00841 00911* 
FF01 NONE 01480 01501* 
F3A3 NTRACE 00774 01144 01146 01813* 
FB32 NXTCHR 00708*00714 
F3D5 OFF ADR 00461 00573 00574 01829* 
FA9D OFFSET 00152 00598* 
FE51 OF SET 00458 00599 01351* 
FDCB OPBT3 01297 01299 01303* 
FDCC OPBTRT 01288 01301 01305* 
FDCD OPBTTB 01284 01313* 
FDAF OPCBYT 01153 01277* 
FC11 OT2HS 00937*00954 00955 00956 
FC14 OT4HS 00938*00944 00957 00958 00960 
F8E0 OUCH4 00229 00247* 

F8DE OUT1S 00242 00243 00244 00245 00246* 
F9A7 ODT2H 00420*00429 00430 
F9B2 OUT2HS 00094 00212 00430*00534 00937 
F8DC OUT2S 00234 00245* 

F9B0 OOT4HS 00093 00205 00276 00429*00531 00613 00938 
F8D6 ODT5S 00219 00242* 
F8C1 OUTASC 00227 00229* 

F9B6 ODTCH 00387 00389 00398 00411 00432*00468 

FF0F OUTCH1 00089 00247 00432 00560 01490 01519* 

FA68 OOTCH5 00560*00589 

F8A0 OUTDAT 00210*00214 

F982 ODTHL 00374*00421 01047 

F986 OUTHR 00384*00424 01050 

F8BF ODTPRD 00225 00228* 

F9B4 ODTS 00431*00590 00702 

F99C PCRLF 00203 00218 00274 00409*00529 00587 00744 00798 00951 
FAD 4 PD2 00558 00600 00625 00628*00696 

F995 PDATA1 00090 00256 00357 00362 00400*00459 00628 00682 00800 00975 
F992 PDATA2 00398*00402 
F405 PIAAC 00072*00677 

F404 PIAAD 00071*00072 00073 00074 00516 00675 01479 
F407 PIABC 00074*00678 01694 01700 

F406 PIABD 00073*00674 01396 01398 01423 01587 01592 01643 01646 01695 01' 
01734 

FCDA PNLDR 00991 01024 01032 01065*01068 



3 -CO 



PAGE 061 TVBUG46 .SA:0 TVBUG 1.2 A VDG MONITOR FOR 6800,01,02,03,08 SYSTE^ 



FB52 PNTBRK 00128 00744*00753 

F829 POWDWN 00108*01763 

FC1E PRINT 00801 00951*01116 01143 

FC17 PRNTBK 00866 00943* 

FB98 PSTAK1 00144 00593 00798* 

FCD3 PUN 00995 01010 01015 01016 01019 01058* 

FC45 PUN00 00977*00981 

FC35 PUNCH 00142 00970* 

FC64 PUND05 00995*00997 

FC6E PUND10 01000*01028 

FC7E PUND25 01004 01006* 

FC95 PUND30 01019*01021 

F9E8 RDBLCK 00473 00480* 

FE49 READY 00695 01348* 

FF94 RET1 01669*01678 

FF90 RETURN 01538 01666* 

FB4D RSTBRK 00148 00737* 

FDA 5 RTISIM 01224 01250* 

FDAA RTSSIM 01226 01256* 

FF04 SAME 01482 01502* 

FF7F SAVE 00097 01374 01383 01560 01566 01640*01670 01709 01738 
FF81 SAVEO 01643*01644 
FF86 SAVE1 01646*01647 

F3CA SAVEX 00538 01472 01476 01521 01569 01821* 

FFCF SCROL3 01731*01732 01741 

FFD4 SCROL4 01734*01735 

FFC9 SCROLL 00092 01529 01725* 

FB59 SETBRK 00150 00750* 

F82E SFEI 00113*01762 

FA50 SKPSTR 00541 00547* 

FE87 SLD1 01396*01397 

FE8C SLD2 01398*01399 

F382 SP 00586 00638 00664 00694 00775 00952 00959 01077 01190 01782* 

F3D0 SSAVE 00829 00885 00943 01825* 

F36F STACK 00171 00658 01772* 

FAD7 START 00636*01764 

F9FB STBLCK 00490*00498 

003F SWI 00058*00917 01097 01188 

F384 SWI1 00113 01783* 

FCE2 SWI1S 00172 01076* 

FCF1 SWI1S1 01086 01088* 

F386 SWI2 01107 01784* 

FE86 SYNCLD 00098 01058 01370 01395* 

F3C6 TEMP 00609 00610 00611 01614 01615 01622 01675 01676 01819* 
F3C8 TEMP2 00308 00309 00336 00337 00342 00569 00571 00572 00575 00576 00! 
01820* 

F3D3 TERMCH 00316 00547 01827* 
FB8C TRACE 00146 00784* 
FB76 TRACE2 00772*00785 
FB79 TRACE 3 00774*00791 

F3A0 TRCADR 00777 01093 01137 01138 01177 01184 01212 01811* 
FD12 TRCINH 01094 01125* 

F3A2 TRCINS 00779 01125 01151 01187 01812* 

FF7E UD0 01618 01620 01625* 

FF64 UPDOWN 01430 01438 01611* 

F396 USR1 00122 01796* 

F399 USR2 00124 01797* 

F39C USR3 00126 01798* 



in 



PAGE 062 TVBOG46 .SA: 0 TVBUG 1.2 A VDG MONITOR FOR 6800 ,01, 02 , 03 , 08 SYSTEt 



F390 USRINP 01503 01793* 
F393 USROUT 01576 01794* 

D000 VDGRAM 00060*01462 01527 01556 01617 01619 01705 01711 01727 01740 M' 

F9B9 VERIFY 00160 00439* 

F3D4 VFLAG 00440 00456 00491 01828* 

FF5B WAIT1 01592*01595 

FF54 WAIT 2 01587*01590 

FF53 WAITFS 01376 01585* 

F3CE XHI 00343 00409 00412 00530 00533 00763 00898 00926 01823* 
F3CF XLOW 00258 00282 00542 00765 00929 01824* 
F923 ZSCR 00162 00294* 



lib P 



PAGE. 001 S1S9 .SA:0 TVRTS TVBUG ROUTINES 

*'*01 NAM TVRTS 

(02 TTL TVBUG ROUTINES 

00003 ********************************************************* 

00004 * THESE ROUTINES ARE POSITION INDEPENDENT AND MAY BE 

00005 * LOCATED ANYWHERE IN MEMORY. 

00006 * THEY INCLUDE THE FOLLOWING: 

00007 * 1. PRINTER DRIVERS - START AT THE BASE ADDRESS 

00008 * 

00009 * CONNECT AN APPROPRIATE RS-232 OR TTL DRIVER TO THE 

00010 * OUTPUT OF THE ACIA (PIN 6), AND ATTACH TO 

00011 ' * A PRINTER. NOW TVBUG WILL PRINT A CHARACTER EACH 

00012 * TIME A CHARACTER IS DISPLAYED ON THE SCREEN. 

00013 * (JUST GREAT FOR WORD PROCESSING!) 

00014 * 

00015 * 2. S1S9 LOADER/PUNCH - START AT THE BASE 

00016 * ADDRESS +2 

00017 * 

00018 * THIS PROGRAM WILL ALLOW TVBUG TO READ AND WRITE 

00019 * PROGRAMS WHICH HAVE BEEN WRITTEN USING THE 

00020 * MIKBUG, EXBUG , OR MINIBUG FORMAT. (S1S9) 

00021 * THIS INCLUDES SWTPC, AND TSC TAPES. 

00022 * 
00023 
00024 
00025 



00056 



********************************************************* 
********************************************************* 



00026 * ROM ROUTINES 



0W28 

00029 
00030 
00031 
00032 
00033 
00034 
00035 
000 36 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 
00048 
00049 
00050 
00051 
>2 

00054 

00055 F37E A ENDA EQU $F37E 



********************************************************* 



F800 


A 


INCH 


EQU 


$F800 


F803 


A 


OUTCH 


EQU 


$F803 


F806 


A 


PDATA1 


EQU 


$F806 


F80F 


A 


OUT4HS 


EQU 


$F80F 


F812 


A 


OUT2HS 


EQU 


$F812 


F821 


A 


CONTRL 


EQU 


$F821 


F929 


A 


BADDR1 


EQU 


$F929 


F96C 


A 


GETADR 


EQU 


$F96C 


F99C 


A 


PCRLF 


EQU 


$F99C 


F9A7 


A 


OUT2H . 


EQU 


$F9A7 


FA6B 


A 


ADDOFF 


EQU 


$FA6B 


FE51 


A 


OFSET 


EQU 


$FE51 






******************* 






* RAM 


TEMPORARIES 






******************* 


F300 


A 


XHI 


EQU 


$F300 


F302 


A 


MCONT 


EQU 


$F302 


F304 


A 


TEMP 


EQU 


$F304 


F306 


A 


BYTECT 


EQU 


$F306 


F308 


A 


TW . 


EQU 


$F308 


F30A 


A 


CKSM 


EQU 


$F30A 


F30C 


A 


FIDH 


EQU 


$F30C 


F3CC 


A 


NEXTBY 


EQU 


$F3CC 


F3D4 


A 


VFLAG 


EQU 


$F3D4 


F3D5 


A 


OFFADR 


EQU 


$F3D5 


F37C 


A 


BEGA 


EQU 


$F37C 



********************************************************* 



00057 * PERIPHERIAL ADDRESSES 



00058 



********************************************************* 



I 



15 



PAGE 002 S1S9 .SA:0 TVRTS TVBUG ROUTINES 



r\ r\ f\ c f\ 

00059 






F408 


A 


ACIAC 


EQU 


$F408 




00060 






F409 


A 


ACIAD 


EQU 


$F409 




00061 


















00062 










********************************************* 


00063 










* 








00064A 


0200 










ORG 


$0200 




00065 










* 








000 66 A 


0200 


20 


02 0204 




BRA 


ACIA 




00067A 


0202 


20 


4E 0252 




BRA 


S1S9 




00068 










* 








00069 - 










* 








A A A "7 A 

00070 










* 








00071 










* START OF 


ACIA DRIVERS 


t\ s\ f\ *"i o 
00072 










* 








r\ r\ r\ ~s 

00073 










ic 








00074 










ik 








00075A 


0204 


86 


03 


A 


ACIA 


LDAA 


#$03 




00076A 


0206 


B7 


F408 


A 




STAA 


ACIAC 


MASTER RESET 


00077A 


0209 


86 


51 


A 




LDAA 


#$51 




00078A 


020B 


B7 


F408 


A 




STAA 


ACIAC 


8 BIT,NP,2STOPS,DIV16 


00079A 


020E 


86 


7E 


A 




LDAA 


#$7E 




00080A 


0210 


B7 


F393 


A 




STAA 


$F393 




Art A A "| •« 

00081A 


0213 


8D 


05 021A 




BSR 


SWAP 




000 8 2 A 


0215 


7E 


F821 


A 




JMP 


CONTRL 


NOW BACK 1 N PRINT ALL 


00083A 


0218 


20 


15 022F 


START 


BRA 


SWICH 




00084A 


021A 


30 






SWAP 


TSX 






00085A 


021B 


A6 


00 


A 




LDAA 


0 , X 




00086A 


021D 


B7 


F300 


A 




STAA 


$F300 




00087A 


0220 


A6 


01 


A 




LDAA 


1,X 




00088A 


0222 


B7 


F301 


A 




STAA 


$F301 




00089A 


0225 


FE 


F300 


A 




LDX 


$F300 




00090A 


0228 


08 








INX 






00091A 


0229 


08 








INX 






00092A 


022A 


08 








INX 






00093A 


022B 


FF 


F394 


A 




STX 


$F394 




00094A 


022E 


39 








RTS 


■ 




00095A 


022F 


36 






SWICH 


PSHA 




SAVE A 


00096A 


0230 


8D 


13 0245 




BSR 


TEST 


GO PRINT CHAR IN A 


00097A 


0232 


81 


0D 


A 




CMPA 


#$0D 


CARRIAGE RETURN? 


00098 A 


0 234 


26 


0D 0243 




BNE 


END 


NO! GO GET NEXT CHAR 


00099A 


0236 


86 


OA 


A 




LDAA 


#$0A 


YES, ADD LF + 4 NULLS 


00100A 


0238 


8D 


0B 0245 




BSR 


TEST 


PRINT LF 


00101A 


023 A 


4F 








CLRA 




NULL 


00102A 


023B 


8D 


08 0245 




BSR 


TEST 


1 NULL 


A A 1 A "3 7V 

0 0 10 3 A 


0 23D 


oD 


06 0245 




BSR 


TEST 


2 NULLS 


00104 A 


023F 


8D 


04 0245 




BSR 


TEST 


3 NULLS 


00105A 


0241 


8D 


02 0245 




BSR 


TEST 


4 NULLS 


00106A 


0243 


32 






END. 


PULA 






00107A 


0244 


23 








RTS 






00108A 


0245 


37 






TEST 


PSHB 




SAVE B 


00109A 


0246 


F6 


F408 


A 


11 


LDAB 


ACIAC 


CHECK ACIA 


00110A 


0249 


57 








ASRB 






00111A 


024A 


57 








ASRB 




READY? 


00112A 


024B 


24 


F9 0246 




BCC 


11 


NO 


00113A 


024D 


B7 


F409 


A 




STAA 


ACIAD 


OUTPUT THE CHARACTER 


00114A 


0250 


33 








PULB 






00115A 


0251 


39 








RTS 







PAGE 003 S1S9 .SA:0 TVRTS TVBUG ROUTINES 



00119 
00120 
00121 
00122A 
00123A 
00124A 
A 
A 
A- 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 

e a 

A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 

00125A 

00126A 

00127A 

00128A 

00129A 

00130A 

00131A 

00132^ 

00133A 

00134A 

00135A 

00136A 

0JA37A 

(fj38A 

0013 9 A 

00140 

00141A 

00142 

00143 



* 
* 
* 
* 
* 



0252 
0254 
0256 
0257 
0258 
0259 
025A 
025B 
025C 
025D 
025E 
025F 
0260 
0261 
0262 
0263 
0264 
0265 
0266 
0267 
0268 
0269 
026A 
026B 
026C 
026D 
026E 
026F 
0270 
0271 
0272 
0273 
0274 
0275 
0276 
0277 
0279 
027C 
027E 
0280 
0282 
0284 
0286 
0288 
028A 
028C 
028E 
0290 
0292 



8D 
20 



8D 
BD 
81 
26 
20 
81 
26 
20 
8-1 
26 
20 
81 
26 
7E 



0295 20 



77 
21 
50 
55 
4E 
43 
48 
20 
28 
50 
29 
2C 
20 
4C 
4F 
41 
44 
20 
28 
4C 
29 
2C 
20 
56 
45 
52 
49 
46 
59 
20 
28 
56 
29 
3F 
04 
1C 

F800 
50 
02 
15 
4C 
02 
54 
56 
02 
50 
IB 
CO 



02CB 
0277 
A 



F821 A 



S1S9 



A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 
A 

0295 
A 
A 

0282 
0297 
A 

0288 
02DC 
A 

028E 
02DE 
A 

0252 



SI - S9 LOADER FUNCTION 



BSR SUB1 USE BSR TO TELL X WHERE TO PRINT 

BRA SWICH1 

FCC /PUNCH (P), LOAD (L), VERIFY (V)?/ 



SWICH1 



KC1 



KC2- 



KC3 



FCB 


$04 


BSR 


P DATA 3 


JSR 


INCH 


CMPA 


#*P 


BNE 


KC1 


BRA 


S1S9P 


CMPA 


#'L 


BNE 


KC2 


BRA 


S1S9L2 


CMPA 


#'V 


BNE 


KC3 


BRA 


S1S9V2 


CMPA 


#$1B 


BNE 


S1S9 


JMP 


CONTRL 


BRA 


PDATA4 



IZt 



C- - 3 



TVRTS TVBUG ROUTINES 



00144 










* 








00145 










* SI - S9 


PUNCH ROUTINE 


00146A 


0297 


BD 


F96C 


A 


S1S9P 


JSR 


GETADR 


GO GET ADDRESSES 


00147A 


029 A 


FE 


F37E 


A 




LDX 


EN DA 




00148A 


029D 


09 








DEX 






00149A 


029E 


FF 


F37E 


A 




STX 


ENDA 


CORRECTS FOR TVBUG 


00150A 


02A1 


8D 


3F 02E2 




BSR 


CLEAR1 


CLEAR SCREEN 


001 5 1A 


02A3 


8D 


3F 02E4 




BSR 


ACPI 


INITIALIZE ACIA FOR PNCH 


00152A 


02A5 


86 


12 


A 




LDAA 


#$12 


TURN TTY PUNCH ON ' 


00153A 


02A7 


8D 


3D 02E6 




BSR 


DUMPO 


OUTPUT CHAR 


00154 " 










* 








00155 










* PUNCH LEADER - 25 


NULLS 


00156 










* 








0015 7 A 


02A9 


C6 


25 


A 




LDAB 


#$25 


B=# NULLS TO PUNCH 


00158A 


02AB 


4F 






PNULL 


CLRA 




A=0 (NULL CHAR) 


00 15 9 A 


02AC 


8D 


38 02E6 




BSR 


DUMPO 




00160A 


02AE 


5A 








DECB 






00161A 


02AF 


26 


FA 02AB 




BNE 


PNULL 




00162A 


02B1 


FE 


F37C 


A 




LDX 


BEGA 




00163A 


02B4 


FF 


F308 


A 




STX 


TW 




00164A 


02B7 


B6 


F37F 


A 


PUN11 


LDAA 


ENDA+1 




00165A 


02BA 


BO 


F309 


A 




SUBA 


TW+1 




00166A 


02BD 


F6 


F37E 


A 




LDAB 


ENDA 




00167A 


02C0 


F2 


F308 


A 




SBCB 


TW 




00168A 


02C3 


26 


23 02E8 




BNE 


PUN 2 2 




00169A 


02C5 


81 


10 


A 




CMPA 


#16 




00170A 


02C7 


25 


21 02EA 




BCS 


PUN 2 3 




00171A 


02C9 


20 


ID 02E8 




BRA 


PUN22 


GO AROUND THE NEXT STUFF 


00172 










* 








00173 










* SOME MORE POSITION INDEPENDENCE STUFF 


00174 










* 








00175A 


02CB 


30 






SUB1 


TSX 




PUT STACK POINTER INTO X-P: 


00176A 


02CC 


A6 


00 


A 




LDAA 


0,X 


PUT FIRST BYTE OF LAST BSR 


00177A 


02CE 


B7 


F300 


A 




STAA 


$F300 


INTO TEMPI 


00178A 


02D1 


A6 


01 


A 




LDAA 


i,x 


PUT SECOND BYTE IN 


00179A 


02D3 


B7 


F301 


A 




STAA 


$F301 - 


INTO TEMP 2 


00180A 


02D6 


FE 


F300 


A 




LDX 


$F300 


NOW GET STRING POINTER 


00181A 


02D9 


08 








I NX 




CORRECT FOR BRA XXX 


00182A 


0 2DA 


08 








I NX 




HERE TOO! 


00183A 


02DB 


39 








RTS 




GO BACK WHERE YA CAME FROM 


00184 










* 








00185A 


02DC 


20 


61 033F 


S1S9L2 


BRA 


S1S9L1 




00186A 


02DE 


20 


61 0341 


S1S9V2 


BRA 


S1S9V1 




00187A 


02E0 


20 


69 034B 


P DATA 4 


BRA 


PDATA2 


HELPSIES! 


00188A 


02E2 


20 


6D 0351 


CLEAR1 


BRA 


CLEAR 




00189A 


02E4 


20 


57 033D 


ACPI 


BRA 


ACPIN 




00190A 


02E6 


20 


5B 0343 


DUMPO 


BRA 


DUMP1 




00191 










* 








00192A 


02E8 


8-6 


OF 


A 


PUN-22 


LDAA 


#15 




00193A 


02EA 


8B 


04 


A 


PUN 2 3 


ADDA 


#4 




00194A 


02EC 


B7 


F302 


A 




STAA 


MCONT 


FRAME COUNT THIS RECORD 


00195A 


02EF 


80 


03 


A 




SUBA 


#3 




00196A 


02F1 


B7 


F304 


A 




STAA 


TEMP 


BYTE COUNT THIS RECORD 


00197 










* PUNCH C/R, 


L/F, NULL, S, 1. 


00198A 


02F4 


86 


42 


A 




LDAA 


#'B 


PRINT 'B' FOR EACH RECORD 


00199A 


02F6 


BD 


F803 


A 




JSR 


OUTCH 




00200A 


02F9 


8D 


DO 02CB 




BSR 


SUB1 




00201A 


02FB 


20 


09 0306 




BRA 


SWICH2 





PAGE 005 S1S9 .SA:0 TVRTS TVBUG ROUTINES 



202A 


02FD 




OD A 


FCB 


$D,$A.O 


•0.0.0.'S.'1.4 PUNCH FORMAT 


A 


02FE 




OA A 








A 


02FF 




00 A 








A 


0300 




00 A 








A 


0301 




00 A 








A 


0302 




00 A 








A 


0303 




53 A 








A 


0304 




31 A 








A 


0305 




04 A 








00203A 


0306 


8D 


3D 0345 


SWICH2 BSR 


PUNCHE 


(LIKE P DATA , ONLY TO ACIA) 


00204A 


0308 


5F 




CLRB 




CLEAR CHECKSUM 


00205 








* PUNCH FRAME COUNT 




00206A 


0309 


CE 


F302 A 


LDX 


#MCONT 




00207A 


030C 


8D 


39 0347 


BSR 


PUNT2 


PUNCH 2 HEX CHARACTERS 


00208 








* PUNCH ADDRESS 




00209A 


030E 


CE 


F308 A 


LDX 


#TW 




00210A 


0311 


8D 


34 0347 


BSR 


PUNT2 




00211A 


0313 


8D 


32 0347 


BSR 


PUNT2 




00212 








* PUNCH DATA 






00213A 


0315 


FE 


F308 A 


LDX 


TW 




00214A 


0318 


8D 


2D 0347 


PUN32 BSR 


PUNT2 


PUNCH ONE BYTE (2 FRAMES) 


00215A 


031A 


7A 


F304 A 


DEC 


TEMP 




00216A 


031D 


26 


F9 0318 


BNE 


PUN32 




00217A 


031F 


FF 


F308 A 


STX 


TW 




00218A 


0322 


53 




COMB 






Qft219A 


0323 


37 




PSHB 






1 12 OA 


0324 


30 




TSX 






0tf22lA 


0325 


8D 


20 0347 


BSR 


PUNT2 


PUNCH CHECKSUM 


00222A 


0327 


33 




PULB 




RESTORE STACK 


00223A 


0328 


FE 


F308 A 


LDX 


TW 




00224A 


032B 


09 




DEX 






00225A 


032C 


BC 


F37E A 


CPX 


ENDA 




00226A 


032F 


26 


86 02B7 


BNE 


PUN11 




00227A 


0331 


8D 


98 02CB 


BSR 


SUB1 




00228A 


0333 


20 


03 0338 


BRA 


SWICH3 




00229A 


0335 




53 A 


FCC 


/S9/ ' 




A 


0336 




39 A 








00230A 


0337 




04 A 


FCB 


$04 




00231A 


0338 


8D 


58 0392 


SWICH3 BSR 


PUNCHP 


OUTPUT EOF 


00232A 


033A 


7E 


F821 A 


JMP 


CONTRL 


GO TO CONTROL 


00233 








* 






00234A 


033D 


20 


IF 035E 


ACPIN BRA 


ACPI NT 




00235A 


033F 


20 


6B 03AC 


S1S9L1 BRA 


S1S9L 




00236A 


0341 


20 


5F 03A2 


S1S9V1 BRA 


S1S9V 




00 23 7 A 


0343 


20 


3D 0382 


DUMP1 BRA 


DUMP 


THESE HELP MAKE IT POS . INDEP 


00238A 


0345 


20 


4B 0392 


PUNCHE BRA 


PUNCHP 




00239 








* 






00240 








* -PUNCH 2 HEX CHARACTERS, UPDATE CHECKSUM 


00241A 


0347 


E"B 


00 A 


PUNT 2 ADDB 


o,x 


UPDATE CHECKSUM 


00242A 


0349 


20 


4E 0399 


BRA 


OUT2H1 


OUTPUT TWO HEX CHAR & RTS 


00243 








* 






g"f,44A 


034B 


BD 


F99C A 


P DATA 2 JSR 


PCRLF 




CW45A 


034E 


7E 


F806 A 


PDAT1P JMP 


PDATA1 




00246 








* 






00247 








* CLEAR SCREEN ROUTINE = ACCA UNCHANGED. 


00248 








* 






00249A 


0351 


36 




CLEAR PSHA 






00250A 


0352 


86 


OC A 


LDAA 


#$oc 


(FF) 



TVRTS TVBUG ROUTINES 



00251A 


0354 


BD 


F803 


A 




JSR 


OUTCH 




00252A 


0357 


86 


DO 


A 




LDAA 


#$D0 




00253A 


0359 


B7 


F3CC 


A 




STAA 


NEXTBY 




00254A 


035C 


32 








PULA 






00255A 


035D 


39 








RTS 






00256 










* 








00257 










* ACIA INITIALIZE (PUNCH) 


00258 










* 








00259A 


035E 


86 


03 


A 


ACPINT 


LDAA 


#3 


MASTER RESET 


00260A 


0360 


B7 


F408 


A 




STAA 


ACIAC 




00261A- 


0363 


86 


51 


A 




LDAA 


#$51 


8 BITS, NP, 2 STOPS,/16 


00262A 


0365 


B7 


F408 


A 




STAA 


ACIAC 




00263A 


0368 


39 








RTS 






00264 










* 








00265 










* ACIA INITIALIZE 1 


[LOAD & VERIFY) 


00266 










* 








00267A 


0369 


86 


03 


A 


ACLINT 


LDAA 


#3 




00268A 


036B 


B7 


F408 


A 




STAA 


ACIAC 




00269A 


036E 


86 


10 


A 




LDAA 


#$10 


DIVIDE BY 1 


00270A 


0370 


B7 


F408 


A 




STAA 


ACIAC 




00271A 


0373 


39 








RTS 






00272 










* 








00273 










* 








00 27 4 A 


0374 


44 






OUTHL 


LSRA 




OUT HEX LEFT BCD DIGIT 


00275A 


0375 


44 








LSRA 






00276A 


0376 


44 








LSRA 






00277A 


0377 


44 








LSRA 






00278A 


0378 


84 


OF 


A 


OUTHR 


AN DA 


#$F 


OUTPUT HEX RIGHT BCD DIGIT 


00279A 


037A 


8B 


30 


A 




ADDA 


#$30 




00280A 


037C 


81 


39 


A 




CMPA 


#$39 




00281A 


037E 


23 


02 0382 




BLS 


DUMP 




00282A 


0380 


8B 


07 


A 




ADDA 


#$7 




00283A 


0382 


37 






DUMP 


PSHB 






00284A 


0383 


F6 


F408 


A 


OUTC1 


LDAB 


ACIAC 




00285A 


0386 


57 








ASRB 






00286A 


0387 


57 








ASRB 






00287A 


0388 


24 


F9 0383 




BCC 


OUTC1 


XMIT NOT READY 


00288A 


038A 


B7 


F409 


A 




STAA 


ACIAD 




00289A 


038D 


33 








PULB 






00290A 


038E 


39 








RTS 






00291 










* 








00292 










* 








00293A 


038F 


8D 


Fl 0382 


PNCHP2 


BSR 


DUMP 




00294A 


0391 


08 








I NX 






00 29 5 A 


0392 


A6 


00 


A 


PUNCHP 


LDAA 


o,x 




00296A 


0394 


81 


04 


A 




CMPA 


#4 




00297A 


0396 


26 


F7 038F 




BNE 


PNCHP2 




00298A 


0398 


39 








RTS 




STOP ON EOT 


00299 










* 








00300 










* 








00301A 


0399 


A6 


00 


A 


OUT2H1 


LDAA 


o,x 


OUTPUT 2 HEX CHARACTERS 


00302A 


039B 


8D 


D7 0374 


OUT2HA 


BSR 


OUTHL 


OUT LEFT HEX CHAR 


00303A 


039D 


A6 


00 


A 




LDAA 


0,X 


PICK UP BYTE AGAIN 


00304A 


039F 


08 








INX 






00305A 


03A0 


20 


D6 0378 




BRA 


OUTHR 


OUTPUT RIGHT HEX CHARACTER 


00306 










* 








00307 










* 








00308 










* 


SI - S9 


VERIFY 


SETS VERIFY FLAG 


17. d 

















PAGE 007 S1S9 



.SA:0 TVRTS TVBUG ROUTINES 



109 
,10 
0TT311 
00312A 
00313A 
00314A 
00315 
00316A 
00317 
00318 
00319A- 
003 20A 
00321A 
00322A 
00323A 
00324A 
00325A 
00326A 
00327A 
00328A 
00.329 
00330A 
00331A 
00332A 
00333A 
00334A 
0#S,35A 
0^>36A 
00337A 
00338A 
00339A 
00340A 
00341A 
00342A 
00343 
00344 
00345 
00346A 
00347A 
00348 
00349 
00350 
00351A 
00352A 
00353A 
00354A 
00355A 
00356A 
00357A 
00358A 
00359A 
0J*£0A 
0%Ji51 
00362 
00363 
00364 
00365A 
00366A 



* 
* 



THEN GOES TO LOAD 



fl "3 A 9 


O D 


fl 1 A 


C 1 CQU 


T r\ A A 


# 1 
f 1 




fl 


JD / 


F? T)A A 




Qrp a A 


V r LiAvj 




03A7 


20 


flfi fl^AF 


* 


DD A 


t n a nfl 




0 3A9 


7E 


F8 21 A 




,TMP 






03 AC 


7F 


F3D4 A 


* 

S1S9L 


CLR 


VFLAG 




03AF 


CE 


FE51 A 


LOADO 


LDX 


#0FSET 


PRINT OFFSET QUESTIONS 


fl "3R9 


fin 


Q7 fl 

y l U J4D 




DCD 


pn ATA 9 




fl 


on 

JDU 


FQ 9Q A 
r y z ^7 a 




J OK 




X = An I = TEMPz 


fl 

U JO / 


p n 
o u 


op n ^ i 

y O UjjI 










fi *3 DQ 

u JBy 


r r 


r JD5 A 




STX 


OF FADR 






o D 


AU U3SE 




O O T» 

BSR 


ACPINT 


PUNCH RDR ON 


A OOP 


o D 


11 A 

11 A 




LDAA 


#511 


(DC1) 


noon 


oD 


r* n n o o o 
LU Uioz 




BSR 


DUMP 




U 


oD 


AC n O £ Q 

AD U3o9 


* 


T> O T~i 

BSR 


TV T T" XT m 

ACLINT 


INIT FOR INPUT 




oD 


DD U41B 


LOADi 


BSR 


LOADE 




fl 


Q 1 
O X 


J j t\ 










fl *3Pfi 


96 


FA fl^PA 




RMF 
DIM Ci 


t o a 


1 cm fUAD MAfP Q 
JLOl LttHK INUl O 


03CA 


BD 


F803 A 




JSR 


OUTCH 


PRINT EACH S 


03CD 


8D 


7B 044A 




BSR 


LOAD 


READ CHAR 


03CF 


81 


39 A 




CMPA 


#'9 




03D1 


27 


D6 03A9 




BEQ 


RESRT1 






ft 1 


1 A 




CMPA 


#'1 




U JUJ 


4. o 






BNE 


L0AD3 




03D7 


7F 


F30A A 




CLR 


CKSM 


ZERO CHECKSUM 


03DA 


8D 


2D 0409 




BSR 


BYTE5 


READ BYTE 


03DC 


80 


02 A 




SUBA 


#2 




03DE 


B7 


F306 A 




STAA 


BYTECT 










* BUILD ADDRESS 
* 




03E1 


8D 


18 03FB 




BSR 


BADDR2 




03E3 


BD 


FA6B A 




JSR 


ADDOFF 


ADDS OFFSET TO X 



★ 
★ 



STORE AND CHECK DATA 



03E6 


8D 


21 


0409 


L0AD11 


BSR 


BYTE5 




03E8 


7A 


F306 A 




DEC 


BYTECT 




03EB 


27 


47 


0434 




BEQ 


L0AD15 


ZERO BYTE COUNT 


03ED 


7D 


F3D4 A 




TST 


VFLAG 




03F0 


26 


02 


03F4 




BNE 


VERFON 




03F2 


A7 


00 


A 




STAA 


0,X 


STORE DATA 


03F4 


Al 


00 


A 


VERFON 


CMPA 


o,x 


CHECK DATA ENTRY 


03F6 


26 


41 


0439 




BNE 


L0AD19 


DATA NOT STORED 


03F8 


08 








I NX 






03F9 


20 


EB 


03E6 


* 


BRA 


L0AD11 












* NEW 
* 


BADDR2 






03FB 


8D 


OC 


0409 


* 

BADDR2 


BSR 


BYTE5 




03FD 


B7 


F300 A 




STAA 


XHI 





IZS 



C- 7 



PAGE 008 S1S9 .SA:0 



TVRTS TVBUG ROUTINES 



Q0367A 


0400 


8D 


07 0409 




BSR 


BYTE5 




00368A 


0402 


B7 


F301 


A 




STAA 


XHI+1 




00369A 


0405 


FE 


F300 


A 




LDX 


XHI 




00370A 


0408 


39 








RTS 






00371 










* 








00372 










* 








00373 










* INPUT BYTE 


FROM AC I A 


00374 










* 








00375 










* 








00376A 


0409 


8D 


12 041D 


BYTE 5 


BSR 


INHEX3 


GET HEX CHAR 


00377A- 


040B 


48 








ASLA 






00378A 


040C 


48 








ASLA 






00379A 


040D 


48 








ASLA 






00380A 


040E 


48 








ASLA 






00381A 


040F 


16 








TAB 






00382A 


0410 


8D 


OB 041D 




BSR 


INHEX3 




00383A 


0412 


IB 








ABA 






00384A 


0413 


16 








TAB 






00385A 


0414 


FB 


F30A 


A 




ADDB 


CKSM 




00386A 


0417 


F7 


F30A 


A 




STAB 


CKSM 




00387A 


041A 


39 








RTS 






00388 










* 








00389A 


041B 


20 


2D 044 A 


LOADE 


BRA 


LOAD 




00390 










* 








00391 










* 








00392A 


041D 


8D 


2B 044A 


INHEX3 


BSR 


LOAD 




00393A 


041F 


20 


00 0421 




BRA 


HEX I D 


CHECK + RTS 


00394 










* 








00395 










* INHEX SUBROUTINE 




00396 










* 








00397A 


0421 


80 


30 


A 


HEX I D 


SUBA 


#$30 




00398A 


0423 


2B 


47 046C 




BMI 


CI 


NOT HEX 


00399A 


0425 


81 


09 


A 




CMPA 


#$09 




00400A 


0427 


2F 


OA 0433 




BLE 


IN1HG 




00401A 


0429 


81 


11 


A 




CMPA 


#$11 




00402A 


042B 


2B 


3F 046C 




BMI 


CI 


NOT HEX 


00403A 


042D 


81 


16 


A 




CMPA 


#$16 




00404A 


042F 


2E 


3B 046C 




BGT 


CI 


NOT HEX 


00405A 


0431 


80 


07 


A 




SUBA 


#7 




00406A 


0433 


39 






IN1HG 


RTS 






00407 










* 








00408 










* DOES CHECKDUM CHECK? 


00409 










* 








00410A 


0434 


7C 


F30A 


A 


LOAD15 


INC 


CKSM 




00411A 


0437 


27 


8B 0 3C4 




BEQ 


LOAD3 




00412A 


0439 


FF 


F30C 


A 


LOAD19 


STX 


FIDH 




00413A 


043C 


86 


20 


A 




LDAA 


#$20 




00414A 


043E 


BD 


F803 


A 




JSR 


OUTCH 




00415A 


0441 


CE 


F30C 


A 




LDX 


#FIDH 




00416A 


0444 


BD 


F80F 


A 




JSR 


OUT4HS 




00417A 


0447 


7E 


F821 


A 




JMP 


CONTRL 




00418 










* 








00419A 


044A 


B6 


F408 


A 


LOAD 


LDAA 


ACIAC 




00420A 


044D 


47 








ASRA 






00421A 


044E 


24 


FA 044A 




BCC 


LOAD 


RX NOT READY 


00422A 


0450 


B6 


F409 


A 




LDAA 


ACIAD 


INPUT CHAR 


00423A 


0453 


84 


7F 


A 




AN DA 


#$7F 


RESET PARITY 


00424A 


0455 


81 


7F 


A 




CMPA 


#$7F 





c -1 



PAGE 009 S1S9 .SA:0 



TVRTS TVBUG ROUTINES 



f25A 0457 
_.26A 0459 
00427 
00428 
00429 
00430 
00431 
00432 
00433 

00434A 045A 
00435A- 045C 
00436A 045D 
00437A 045E 
00438A 045F 
00439A 0460 
00440A 0461 
00441A 0463 
00442A 0464 
00443A 0465 
00444A 0468 
00445A 046B 
00446 

00447A 046C 
00448 

00449A 046F 
00450A 0472 

0V*52 

TOTAL ERRORS 



27 Fl 044A 
39 



BEQ 
RTS 



LOAD 



RUBOUT - DEL 



* 
* 
* 
* 
* 
* 



PRINT LINE WITH A PRECEEDING CR/LF 
X POINTS TO STRING. STRING MUST 
TERMINATE WITH A $04 CHARACTER. 



INPUT BYTE (TWO FRAMES FROM KEYBOARD) 



8D 13 046F BYTE 

48 

48 

48 

48 

16 

8D 0C 046F 

IB 

16 

FB F30A A 
F7 F30A A 
39 



7E F821 A 

BD F800 A 
20 AD 0421 



CI 
* 



BSR 

ASLA 

ASLA 

ASLA 

ASLA 

TAB 

BSR 

ABA 

TAB 

ADDB 

STAB 

RTS 

JMP 



INHEX JSR 
BRA 

* 



END 



INHEX 



INHEX 



CKSM 
CKSM 



CONTRL 

INCH 
HEXID 



GET HEX CHARACTER 



CHECK + RTS 



00000--00000 



0204 


ACIA 


00066 


00075* 






F408 


ACIAC 


00059 


*00076 


00078 


00109 


F409 


ACIAD 


00060 


*00113 


00288 


00422 


0369 


ACLINT 


00267 


*00328 






02E4 


ACPI 


00151 


00189* 






033D 


ACPIN 


00189 


00234* 






035E 


ACPINT 


00234 


00259* 


00325 




FA6B 


ADDOFF 


00039 


*00347 






F929 


BADDR1 


00035 


*00322 






03FB 


BADDR2 


00346 


00365* 






F37C 


BEGA 


00054 


*00162 






045A 


BYTE 


00434 


* 






0409 


BYTE5 


00340 


00351 


00365 


00367 


F306 


BYTECT 


00047 


*00342 


00352 




046C 


CI 


00398 


00402 


00404 


00447 


F30A 


CKSM 


00049 


*00339-. 


00385 


00386 


0351 


CLEAR* 


00188 


00249*00323 




02E2 


CLEAR1 


00150 


00188* 




F821 


CONTRL 


00034 


*00082 


00139 


00232 


<0382 


DUMP 


00237 


00281 


00283* 


00293 


^343 


DUMP1 


00190 


00237* 






02E6 


DUMPO 


00153 


00159 


00190* 




0243 


END 


00098 


00106* 






F37E 


ENDA 


00055 


*00147 


00149 


00164 


F30C 


FIDH 


00050 


*00412 


00415 




F96C 


GETADR 


00036 


*00146 







00109 00260 00262 00268 00270 00284 00419 



Z7 



PAGE 010 S1S9 .SA:0 TVRTS TVBUG ROUTINES 



0421 HEXID 
0246 II 

0433 IN1HG 
F800 INCH 
046F INHEX 
041D INHEX3 
0282 KC1 
0288 KC2 
028E KC3 
044A LOAD 
03A-F LOAD0 
03E6 LOAD11 

0434 LOAD15 
0439 LOAD19 
03C4 LOAD3 
04 IB LOADE 
F302 MCONT 
F3CC NEXTBY 
F3D5 OFFADR 
FE51 OFSET 
F9A7 OUT2H 
0399 OUT2H1 
039B OUT 2 HA 
F812 OUT2HS 
F80F OUT4HS 
0383 OUTC1 
F803 OUTCH 
0374 OUTHL 
0378 OUTHR 
F99C PCRLF 
034E PDAT1P 
F806 PDATAl 
034B PDATA2 
0295 P DATA 3 
02E0 PDATA4 
038F PNCHP2 
02AB PNULL 
02B7 PUN11 
02E8 PUN22 
02EA PUN23 
0318 PUN32 
0345 PUNCHE 
0392 PUNCHP 
0347 PUNT2 
03A9 RESRT1 
0252 S1S9 
03AC S1S9L 
033F S1S9L1 
02DC S1S9I/2 
0297 S1S9P 
03A2 S1S9V 
0341 S1S9V1 
02DE S1S9V2 
0218 START 
02CB SUB1 
021 A SWAP 
022F SWICH 
0277 SWICH1 



00393 

00109* 

00400 

00029* 

00434 

00376 

00129 

00132 

00135 

00334 

00314 

00351* 

00353 

00358 

00330* 

00330 

00045* 

00051* 

00053* 

00040* 

00038* 

00242 

00302* 

00033* 

00032* 

00284* 

00030* 

00274* 

00278* 

00037* 

00245* 

00031* 

00187 

00126 

00141 

00293* 

00158* 

00164* 

00168 

00170 

00214* 

00203 

00231 

00207 

00316* 

00067 

00235 

00185 

00133 

00130 

00236 

00186 

00136 

00083* 

00122 

00081 

00083 

00123 



00397*00450 
00112 
00406* 
00127 00449 
00440 00449* 
00382 00392* 
00131* 
00134* 
00137* 

00389 00392 00419*00421 00425 

00320* 

00360 

00410* 

00412* 

00332 00338 00411 

00389* 

00194 00206 

00253 

00324 

00320 

00301* 



00416 
00287 

00199 00251 00333 00414 * 

00302 

00305 

00244 

00245 

00244*00321 

00141* 

00187* 

00297 

00161 

00226 

00171 00192* 
00193* 
00216 
00238* 

00238 00295* 

00210 00211 00214 00221 00241* 
00336 

00122*00138 

00319* 

00235* 

00185* 

00146* 

00312* 

00236* 

00186* 



00175*00200 00227 

00084* 

00095* 

00126* 



I o 



PAGE Oil S1S9 .SA:0 TVRTS TVBUG ROUTINES 



r\ ^ r\ f 

0306 


SWICH2 


00201 00203* 










0338 


SWICH3 


00228 00231* 










F304 


TEMP 


00046*00196 00215 










0245 


TEST 


00096 00100 00102 


00103 


00104 


00105 


00108* 


F308 


TW 


00048*00163 00165 


00167 


00209 


00213 


00217 00223 


03F4 


VERFON 


00355 00357* 










F3D4 


VFLAG 


00052*00313 00319 


00354 








F300 


XHI 


00044*00366 00368 


00369 









)29 



0200 


20 


02 


20 


4E 


86 


03 


B7 


F4 


08 


86 


51 


B7 


F4 


08 


86 


7E 


. N. .7 . . ,Q7 . . . . 


0210 


B7 


F3 


93 


8D 


05 


7E 


F8 


21 


20 


15 


30 


A6 


00 


B7 


F3 


00 


7......! • 0 & • 7 • • 


0220 


A6 


01 


B7 


F3 


01 


FE 


F3 


00 


08 


08 


08 


FF 


F3 


94 


39 


36 




0230 


8D 


13 


81 


0D 


26 


0D 


86 


OA 


8D 


0B 


4F 


8D 


08 


8D 


06 


8D 




0240 


04 


8D 


02 


32 


39 


37 


F6 


F4 


08 


57 


57 


24 


F9 


B7 


F4 


09 


. . .297. . ,WW$.7. . 


0250 


33 


39 


8D 


77 


20 


21 


50 


55 


4E 


43 


48 


20 


28 


50 


29 


2C 


39.. 1 PUNCH (P), 


0260 


20 


4C 


4F 


41 


44 


20 


28 


4C 


29 


2C 


20 


56 


45 


52 


49 


46 


LOAD (L) , VERIF 


0270 


59 


20 


28 


56 


29 


3F 


04 


8D 


1C 


BD 


F8 


00 


81 


50 


26 


02 




0280 


20 


15 


81 


4C 


26 


02 


20 


54 


81 


56 


26 


02 


20 


50 


81 


IB 


..L&. T.V&. P.. 


0290 


26 


CO 


7E 


F8 


21 


20 


49 


BD 


F9 


6C 


FE 


F3 


7E 


09 


FF 


F3 




02A0 


7E 


8D 


3F 


8D 


3F 


86 


12 


8D 


3D 


C6 


25 


4F 


8D 


38 


5A 


26 




02B0 


FA 


FE 


F3 


7C 


FF 


F3 


08 


B6 


F3 


7F 


B0 


F3 


09 


F6 


F3 


7E 




02C0 


F2 


F3 


08 


26 


23 


81 


10 


25 


21 


20 


ID 


30 


A6. 


00 


B7 


F3 


...&#..%! .0&.7. 


U2DU 


A A 
UU 


Ao 


A 1 


B7 


F3 


A T 


FE 


F3 


A A 
UU 


A O 

08 


A O 


O A 

39 


O A 

20 


61 


20 


61 


c "7 Q 


02E0 


20 


69 


20 


6D 


20 


57 


20 


5B 


86 


OF 


8B 


04 


B7 


F3 


02 


80 


• • W [••••7«e« 


02FO 


03 


B7 


F3 


04 


86 


42 


BD 


F8 


03 


8D 


DO 


20 


09 


0D 


OA 


00 


• 7 • • • B""" • • • I? •••• 


0300 


00 


00 


00 


53 


31 


04 


8D 


3D 


5F 


CE 


F3 


02 


8D 


39 


CE 


F3 


. . .SI. .= N. . . 9N . 


0310 


08 


8D 


34 


8D 


32 


FE 


F3 


08 


8D 


2D 


7A 


F3 


04 


26 


F9 


FF 


. .4.2 . .&. . 


0320 


F3 


08 


53 


37 


30 


8D 


20 


33 


FE 


F3 


08 


09 


BC 


F3 


7E 


26 


• . S 7 0 « 3*»*«^*«& 


0330 


86 


8D 


98 


20 


03 


53 


39 


04 


8D 


58 


7E 


F8 


21 


20 


IF 


20 




0340 


6B 


20 


5F 


20 


3D 


20 


4B 


EB 


00 


20 


4E 


BD 


F9 


9C 


7E 


F8 


= K . . N= . . . . 


0350 


06 


36 


86 


OC 


BD 


F8 


03 


86 


DO 


B7 


F3 


CC 


32 


39 


86 


03 


.6. .==. . .P7.L29. . 


0360 


B7 


F4 


08 


86 


51 


B7 


F4 


08 


39 


86 


03 


B7 


F4 


08 


86 


10 


7 • • # Q7 ••9««7«»*« 


0370 


B7 


F4 


08 


39 


44 


44 


44 


44 


84 


OF 


8B 


30 


81 


39 


23 


02 


7. . 9DDDD. . .0,9#. 


0380 


8B 


07 


37 


F6 


F4 


08 


57 


57 


24 


F9 


B7 


F4 


09 


33 


39 


8D 


. .1 . . .WW$.7. .39. 


0390 


Fl 


08 


A6 


00 


81 


04 


26 


F7 


39 


A6 


00 


8D 


D7 


A6 


00 


08 


..&...& .9& . .W& • . 


03A0 


20 


D6 


86 


01 


B7 


F3 


D4 


20 


06 


7E 


F8 


21 


7F 


F3 


D4 


CE 


V. .7.T . . . ! . .TN 


03B0 


FE 


51 


8D 


97 


BD 


F9 


29 


8D 


98 


FF 


F3 


D5 


8D 


AO 


86 


11 




03C0 


8D 


CO 


8D 


A5 


8D 


55 


81 


53 


26 


FA 


BD 


F8 


03 


8D 


7B 


81 


.@*%.U.S&. SS ...*. 


U3DU 


O A 


27 


Do 


O 1 

81 


il 


2o 


ED 


1 F 


Fi 


A n 
UA 


oD 


2D 


O A 

oU 


A O 

U2 


B 7 


F3 


A f TT If 1 

? V.JLa... ••""••/• 


03E0 


06 


8D 


18 


BD 


FA 


6B 


8D 


21 


7A 


F3 


06 


27 


47 


7D 


F3 


D4 


... G • . T 


03F0 


26 


02 


A7 


00 


Al 


00 


26 


41 


08 


20 


EB 


8D 


OC 


B7 


F3 


00 


&. f .!.StA. • • • 7 • • 


0400 


8D 


07 


B7 


F3 


01 


FE 


F3 


00 


39 


8D 


12 


48 


48 


48 


48 


16 




0410 


8D 


OB 


IB 


16 


FB 


F3 


OA 


F7 


F3 


OA 


39 


20 


2D 


8D 


2B 


20 


9 -.+ 


0420 


00 


80 


30 


2B 


47 


81 


09 


2F 


OA 


81 


11 


2B 


3F 


81 


16 


2E 


. .0+G. ./. . .+? 


0430 


3B 


80 


07 


39 


7C 


F3 


OA 


27 


8B 


FF 


F3 


OC 


86 


20 


BD 


F8 


q i - 

/.e^.«. ..... . 


0440 


03 


CE 


F3 


0C 


BD 


F8 


OF 


7E 


F8 


21 


B6 


F4 


08 


,47 


24 


FA 




0450 


B6 


F4 


09 


84 


7F 


81 


7F 


27 


Fl 


39 


8D 


13 


48 


48 


48 


48 


6 ' .9. . HHHH 


0460 


16 


8D 


OC 


IB 


16 


FB 


F3 


OA 


F7 


F3 


OA 


39 


7E 


F8 


21 


BD 




0470 


F8 


00 


20 


AD 


00 


00 


00 


00 


E6 


06 


A7 


06 


E7 


04 


E6 


03 


_ i 
.. ...... ..... 



*3o 



C- ( 2. 



§ "B02002002204E8603B7F4088651B7F408867EB7F3938D057EF8 2122 

^rlB0218201530A600B7F300A601B7F30lFEF300080808FFF394 3936C5 

S11B02308D13810D260D860A8D0B4F8D088D068D048D02323937F6F406 

S11B024808575724F9B7F40933398D77202150554E4348202850292CF7 

S11B0260204C4F414420284C292C20564552494659202856293F048DCD 

S11B02781CBDF800815026022015814C26022054815626022050811BF7 

S11B0 29026C07EF8212049BDF96CFEF37E09FFF37E8D3F8D3F86128DA5 

S11B0 2A83DC6254F8D385A26FAFEF37CFFF308B6F37FB0F309F6F37EE2 

S11B02C0F2F308262381102521201D30A600B7F300A601B7F301FEF315 

S11B02D800080839206120612069206D2057205B860F8B04B7F3028067 

S11B02F003B7F3048642BDF8038DD020090D0A000000005331048D3DD2 

S11B03085FCEF3028D39CEF3088D348D32FEF3088D2D7AF30426F9FF66 

S11B0320F3085337308D2033FEF30809BCF37E26868D98200353390479 

S11B03388D587EF821201F206B205F203D204BEB00204EBDF99C7EF8FB 

S11B03500636860CBDF80386D0B7F3CC32398603B7F4 088651B7F4 080E 

S11B0368398603B7F4088610B7F4083944444444840F8B308139230245 

S11B03808B0737F6F4 08575724F9B7F40933398DF108A600810426F7ED 

S11B039839A6008DD7A6000820D68601B7F3D420067EF8217FF3D4CE8C 

S11B03B0FE518D97BDF9298D98FFF3D58DA086118DC08DA58D558153FA 

S11B03C826FABDF8038D7B813927D6813126ED7FF30A8D2D8002B7F3 5B 

S11B03E0068D18BDFA6B8D217AF30627477DF3D42602A700A10026418A 

S11B03F80820EB8D0CB7F3008D07B7F301FEF300398D124848484816 55 

S11B04108D0B1B16FBF30AF7F30A39202D8D2B200080302B4781092FE2 

S11B04280A81112B3F81162E3B8007397CF30A278BFFF30C8620BDF8 6E 

S11B044003CEF30CBDF80F7EF821B6F4084724FAB6F409847F817F2781 

SJ4B0458F1398D1348484848168D0C1B16FBF30AF7F30A397EF821BD45 

af 70470F80020ADBF 

S9T530000FC 



Appendix D (con't) 
1) TSC SPACE VOYAGE 



00E9 


7E 


F806 




PDATA 










OOEC 


7E 


F986 




OUTHR 










OOEF 


7E 


F982 




OUTHL 










00F2 


7E 


F9B4 




OUTS 










OOF5 


7E 


F803 




DUTCH 










00F8 


•7E 


F800 




INCH 










OOFB 


7E 


F04A 




RANDOM 










OlOO 


8E 


F36F 




STACK 










04DC 


20 


20 


53 


44 54 


45 


3A 


20 


04 


ODAO 


20 


20 


5B 


48 4C 


44 


3A 


20 


04 


0DB6 


OD 


04 














0E95 


43 


4B 


2D 


53 48 


49 


45 


4C 


44 




53 


20 


48 


4F 4C 


44 


49 


4E 


47 04 


0F5C 


OD 


04 















2) TSC DEBUG PACKAGE 



4106 


7E 


F800 


INCH 




4109 


7E 


F803 


OUTCH 




410C 


7E 


F821 


MONITOR 




410F 




F404 


KEYBOARD P/A 




42A1 


2B 


OA 


BMI PCRLF2 


CHECKS FOR 


42A3 


A6 


00 


LDAA 0,X 


CHAR. FROM 


42A5 


01 




NOP 


KEYBOARD 


42BE 


2B 


FC 


BMI WAITR1 




42C0 


01 




NOP 


CHECK FOR CHAR. 


42C1 


A6 


00 


LDAA 0,X 




42C5 


Bl 


4112 


CMPA DEL 


CNTRL C? 


5999 


OD 


04 







NOTE: An "ESC" Character wil 1 stop the display. A control 'C will restart it. 

This is the only difference from standard operation. It is necessary due 

to the operation of the keyboard scan routine. 

3) TSC DISASSEMBLER 



1900 


8E 


F36F 


STACK 


190C 


7E 


F803 


OUTCH 


190F 


7E 


F800 


INCH 


197A 


OD 


04 





D-2 



4) TSC KLINGON CAPTURE 



7E 


F806 


PDATA 


7E 


F803 


OUTCH 


7E 


F800 


INCH 


7E 


F04A 


RANDOM 


7E 


F821 


CONTROL 


8E 


F36F 


STACK 


OD 


OA OA 


OA OA 



002F 
0032 
0035 
0038 
003B 
003E 
03B2 
03D5 
040F 
04 5A 
04 7D 
0499 

04D1 (Replace all NULLS 

051A with LF's, which 

055E TVBUG will not 

058B Respond to). 

05C7 

0605 

0672 

0694 

06B1 

06E4 

0724 

074C 

0765 

0765 

079F OD OA OA OA OA OA 



5) TSC RANDOM NUMBER GENERATOR 

Use Quick Load Function to enter. Start Location F04A. Change all 'AO' to 'FO' 
and seed FO 70, 1,2, 3, 4 with Non-Zero Numbers. 



6) TSC BATTLESHIP 



0100 


8E 


F36F 


STACK 


0107 


7E 


F803 


OUTCH 


01 OA 


7E 


F800 


INCH 


01CO 


7E 


F821 


MONITOR 


066E 


OD 


04 




0732 


OA 


OA OA 


OA OA 



7) TSC STOCKMARKET 



0102 


7E 


F803 


OUTCH 


0105 


7E 


F800 


INCH 


0108 


7E 


F806 


PDATA 



D-3 



01 OB 


7E 


F982 




OUTCH 




040E 


7E 


F986 




OUTHR 




0111 


7E 


F821 




CONTROL 




0114 


7E 


F04A 




RANDOM 




0117 


8E 


F36F 




STACK 




04C0 


OD 


OD 


OA 


OA OA 


OA 


04ED 


OD 


OA 


OA 


OA OA 


OA 


058A 


OD 


OA 


OA 


OA OA 


OA 


05B7 


OD 


OA 


OA 


OA OA 


OA 


05E6 


OD 


OA 


OA 


OA OA 


OA 


0621 


OD 


04 









8) TSC HANGMAN 



0102 


7E 


F803 


OUTCH 


0105 


7E 


F800 


INCH 


0108 


7E 


F806 


PDATA 


01 OB 


7E 


F9B4 


OUTS 


01 OE 


7E 


F821 


CONTROL 


0111 


7E 


F04A 


RANDOM 


0114 


8E 


F36F 


STACK 


021F 


OD 


04 




0245 


OD 


OA OA 


OA OA 



9) TSC ACEY- DUCEY 



0034 


7E 


F04A 




RANDOM 


0037 


7E 


F806 




PDATA 


P03A 


7E 


F803 




OUTCH 


003D 


7E 


F800 




INCH 


0040 


7E 


F982 




OUTHL 


0043 


7E 


F986 




OUTHR 


0046 


8E 


F36F 




STACK 


0223 


OD 


04 






022A 


OD 








0241 


OD 








02AF 


OD 


OA 


OA 


OA OA 


02FD 


OD 


OA 


OA 


OA OA 



D-4 

iz4 



10) TSC 'CRAPS' 



0022 


7E 


F04A 


RANDOM 




7C 
/ c 


Fftflfi 
rouu 


r Un 1 M 


0028 


7E 


F803 


OUTCH 


002B 


7E 


F800 


INCH 


002E 


7E 


F982 


OUTHL 


0031 


• 7E 


F986 


OUTHR 


0034 


7E 


F821 


CONTROL 


0044 


8E 


F36F 


STACK 


0238 


OD 


04 




0243 


OD 






0252 


OD 






02 5A 


OD 






0269 


OD 






0289 


OD 






02A1 


OD 


OA OA 


OA OA 


032E 


OD 







11) TSC MASTERMIND 



0042 


7E 


F800 




INCH 


0045 


7E 


F803 




OUTCH 


0048 


7E 


F806 




PDATA 


004B 


7E 


F9B4 




OUTS 


004E 


7E 


F982 




OUTHL 


0051 


7E 


F986 




OUTHR 


0054 


7E 


F821 




CONTROL 


0057 


7E 


F04A 




RANDOM 


005A 


8E 


F36F 




STACK 


0173 


OD 


OA 


OA 


OA OA 


018A 










01AB 










01C1 










01CF 










01E7 










0206 


OD 


OA 


OA 


OA OA 



D-5 

/35 



12) TSC CARD SHUFFLE AND DEAL 



13) TSC 



0061 


BD 


F04A 




RANDOM 


0100 


8E 


F36F 




STACK 


0115 


BD 


F803 




OUTCH 


Ulin 


DU 


rouo 




uu ! un 


011F 


BD 


F803 




OUTCH 


01 2E 


BD 


F806 




PDATA 


0137 


BD 


F806 




PDATA 


UIOD 


nn 
uu 








0141 


00 


OD 


OD 


04 


014B 


BD 


F803 




OUTCH 


NUMBER 


GUESS 


1 






0020 


8E 


F36F 




STACK 


0028 


BD 


F806 




PDATA 


002B 


BD 


F04A 




RANDOM 


0039 


BD 


F806 




PDATA 


003C 


BD 


F800 




INCH 


004A 


BD 


F806 




PDATA 


0058 


BD 


F806 




PDATA 


0060 


BD 


F806 




PDATA 


0068 


BD 


F806 




PDATA 


0071 


BD 


F806 




PDATA 


0076 


BD 


F986 




OUTHR 


007C 


BD 


F806 




PDATA 


007F 


BD 


F800 




INCH 


0086 


BD 


F821 




CONTROL 


0089 


00 


OA 


OA 


OA 


00A6 


00 


OA 


OA 


OA 


OOBA 


OD 


OA 


OA 


OA 


00D3 


OD 


OA 


OA 


OA 


OODF 


OD 


OA 


OA 


OA 


OOEC 


OD 


OA 


OA 


OA 


00F9 


OD 


OD 


OA 


OA 


on A 


00 


OA 


OA 


OA 


01 2C 


OD 


OA 


OA 


OA 



D-6 



14) TSC NUMBER GUESS II 



0042 


7E 


F803 




0UTCH 


0045 


7E 


F800 




INCH 


0048 


7E 


F806 




PDATA 


004B 


7E 


F982 




0UTHL 


004E 


7E 


F986 




0UTHR 


0051 


7E 


F821 




CONTROL 


0054 


7E 


F04A 




RANDOM 


0057 


8E 


F36F 




STACK 


0125 


0D 


04 






0155 


0D 


OA 


OA 


OA OA 


01 6B 










0183 










01ED 


0D 


OA 


OA 


OA OA 



15) TSC HURKLE 



0022 


7E 


F04A 


RANDOM 


0025 


7E 


F806 


PDATA 


0028 


7E 


F800 


INCH 


002B 


7E 


F803 


OUTCH 


002E 


7E 


F821 


CONTROL 


0038 


8E 


F36F 


STACK 


013C 


0D 


04 




01 5D 


0D 






01A3 


OD 







16) TSC ROVER 



0022 


7E 


F04A 


RANDOM 


0025 


7E 


F806 


PDATA 


0028 


7E 


F800 


INCH 


002B 


7E 


F803 


OUTCH 


002E 


7E 


F821 


CONTROL 


0049 


8E 


F36F 




01B8 


OD 


04 




01C3 


OD 






01D2 


OD 






022D 


OD 







D-7 



/3? 



17) 



TSC SWITCH 



0102 


7E 


F800 


INCH 


0105 


7E 


F806 


PDATA 


0108 


7E 


F982 


OUTHL 


01 OB 


7E 


F986 


OUTHR 


010E 


7E 


F9B4 


OUTS 


0111 


7E 


F821 


CONTROL 


0114 


7E 


F04A 


RANDOM 


0215 


OD 


04 




02 3D 


OD 


OD OA 


OA OA 



18) TSC CHOM 



0042 


7E 


F803 


OUTCH 


0045 


7E 


F800 


INCH 


0048 


7E 


F806 


PDATA 


004B 


7E 


F9B4 


OUTS 


004E 


7E 


F821 


CONTROL 


0051 


8E 


F36F 


STACK 


0178 


OD 


04 




01A2 


OD 


04 




01B8 


OD 


OD OA 


OA OA 



19) TSC 10K BASIC 



0106 


7E 


F821 


0109 


7E 


F800 


01 OF 


7E 


F803 


0112 


7E 


FOOO 


0115 


7E 


F020 



CONTROL (EXIT) 

INCH 

OUTCH 

TINCH EXTERNAL ROUTINES 
TOUCH 



0042 




F408 








0888 


OD 


04 








01F8 


BD 


01 


C7 


20 


05 


0252 


BD 


01 


C7 


20 


06 


0496 


01 


01 


01 






01C7 


B6 


F4 


04 


81 


03 



A clear screen may be accomplished by the following 2 statements in a program. 
Print CHR $(12) 
Poke HEX ("F3CC"), HEX("D0") 

C8^ FOOO 37 C6 51 F7 F4 08 F6 F4 08 57 57 24 F9 B7 F4 09 33 39 
r !fjCX c8TJ>S- F020 86 03 B7 F4 08 86 10 B7 F408 B6 F408 47 24 FA B6 F4 09 

39 



D-8 



These Routines at $F000 are necessary for cassette Save and Load operation with 
TVBUG. They may be placed any where in memory. The Lower Stack area is most 
convenient. 

External Plot Routings may be added by using the USR Function. 
20) TSC REL0CAT0R 



01F0 


7E 


F020 


KCIN 


021F 


7E 


F803 


OUTCH 


0222 


7E 


F800 


INCH 


0225 


7E 


F821 


CONTROL 


0242 


8D 


AC 




02AA 


BD 


F020 


KCIN 


02B1 


BD 


F020 


KCIN 


05B1 


OA 


OA OA 


OA 04 


05B6 


OA 


OA OA 


OA 04 


05BB 


OD 


04 





Note: Punch From 1F0 - 6B3 to include Lower jump 

F020 86 10 B7 F4 08 B6 F4 08 47 24 FA B6 F4 09 39 

Note: This Relocator will Load tape programs only from the S1-S9 format. If 

TVBUG-type tapes are to used, First Load the tape, then use the relocator 
to move the program. Also note that the Offset may be used for TVBUG 
tapes, but data Blocks will not be preserved. 

21) TSC TEXT EDITOR 





0206 


7E 


F800 




INCH 












0209 


7E 


F803 




OUTCH 










020C 


7E 


F020 




TINCH 










020F 


7E 


F000 




TOUCH 










0458 


OD 


04 
















098B 


7E 


F821 




CONTROL 










0D92 


OD 


OA 


OA 


OA 


OA 


OA 


OA 




TOUCH 


F000 37 


C6 


51 


F7 


F4 


08 


F6 


F4 


08 




57 


57 


24 


F9 


B7 


F4 


09 


33 


39 


TINCH 


F020 86 


03 


B7 


F4 


08 


86 


10 


B7 


F4 




08 


B6 


F408 47 


24 


FA 


B6 


F4 


09 



D-9 



/39 



22^ : TSC MNEMONIC ASSEMBLER 



03gv\ 


8F 


F36F 


STACK 


031B 


7E 


F821 


CONTROL 


0320 


7E 


E803 


OUTCH 


0323 


7E 


EOOQ 


TOUCH 


07CF 


00 


04 




11D1 


00 


04 




156F 


00 


OA OA 


OA OA 



FOOO 37 C6 51 F7 F408 F6 F408 57 57 24 F9 B7 F4 09 33 
39 

23) TSC TEXT PROCESSOR 

0203 7E F803 OUTCH 

0206 7E F800 INCH 

0209 7E F821 CONTROL 

1543 00 04 

1471 B6 F404 2A 01 39 NEW BREAK ROUTINE 

B6 F404 81 03 26 F8 FOR TV BUG 

CE 1592 7E OC 08 01 (SEE BELOW) 



This break routine shold be used with TV8UG instead of the current one. 



0471 


B6 


F404 TSTBRK 


LDAA PIA 




0474 


2A 


01 


BPL TSTBR4 


CHARACTER? 


0476 


39 


~~ TST8R2 


RTS 




0477 


86 


F404 TST8R4 


LDAA PIA 




047A 


81 


03 


CMPA #$03 


CNTRL 'C\? 


047C 


26 


F8 


BNE TST8R2 




047E 


CE 


TI92 


LDX #BRKSTR 


POINT TO STRING 


0481 


7E 


0C08 


JMP. ST0P1 


OUTPUT IT 


0484 


01 




NOP 





D-10 



MICRO CHROMA 68 
THE NEW "&UG" 
FROM MOTOROLA 
TVBUG 1.2® 

NMOS Microcomputer Systems Applications 

Austin, Texas 



Prepared By 
Tim Ahrens 
Dave Williamson 
Software by John Dumas 



M) MOTOROLA INC. 



Although the information contained herein, as well.as any information provided relative thereto, has been carefully reviewed and is 
believed accurate, Motorola assumes no liability arising out of its application or use. Neither does it convey any license under its 
patent rights nor the rights of others. 

Copyright 1978 by Motorola Inc. 

t 



Introduction: 

In a continuing effort to provide support for the users of MC6800's and MC6800 Family Peripherals, Motorola has 
introduced products which will interface directly with a standard color television receiver. 



Introducing Micro Chroma 68 

This package contains the major kit components necessary to make a standard, unmodified color television 
receiver into a monitor for a highly sophisticated computer system. 

1) MC6808 Microprocessor with Clock Generator (MPU) 

2) MC6846P3 RIOT with TVBUG 

3) MC6821 Peripheral Interface Adapter (PI A) 

4) MC6850 Asynchronous Serial Interface Adapter (ACIA) 

5) MC6847 Video Display Generator (VDG) 

6) MC1372 Video RF Modulator 

7) Data sheets on all parts 

8) Hardware/software descriptions 

9) Complete system schematic 
10) Complete parts list 



I. VDG SYSTEM HARDWARE 

The TVBUG system as shown in Figure 1, is 
configured for a minimum hardware application. This 
system includes the MC6808 microprocessor, the 
MC6846 Timer, I/O, ROM with TVBUG 1.2, keyboard 
interface chip, the MC6821 PI A, MC6850 ACI A for Serial 
I/O, the MC6847 Video Display Generator, and an 
MC1372 Video Radio Frequency (RF) modulator. In ad- 
dition to this, the schematic shows 1 K bytes of RAM for 
display, the STACK RAM area, and the user RAM. A 
Kansas City Standard 300 baud cassette tape interface 
is also shown for ease of program storage. 

BASIC OPERATION 

The new MC6808 (microprocessor with clock) is used 
as the microprocessor and is coupled with the 
MC6846P3 (ROM, I/O, and timer) for a permanent 
monitor system. The MC6846P3 (TVBUG) has been 
programmed to "talk" to the MC6847 VDG display RAM 
as an output port, and a standard ASCII keyboard is 
connected to the MC6821 for data input. The actual 
hook-up of the MPU is standard to almost any dedicated 
system with _a few exceptions. The MCM2114's cannot 
have the R/W pulse applied to them during the normal 
MC680X write cycle, as any data which is on the bus will 
be written to the RAM. To solve this problem, the 
combination of 02 with R/W will provide a delayed R/W 
pulse within the MCM2114 specifications. 

All address decoding for 8K bytes of RAM has been 
done on board by use of the 74LS138 three to eight line 
decoder. With the decoding scheme shown, up to 8K 
bytes of user RAM can be placed on the bus without 
further decoding, and decoding for every 1K block of 
memory from D000 to FFFF has also been provided. This 
latter decoding will provide the user with an option of 
including up to an additional 5K of bytes of display RAM 
to utilize the full 256 X 192 element graphic mode of the 
MC6847. One note of caution though, no additional 
decoding (i.e. 74LS138's) can be supported by the 
higher order address bus lines without using the 
traditional 8T26-28 bus extenders. An alternative to this 
problem is to do a different decode with the present 
138's, and use MCM6641's (4K X 1) RAM chips. This 
would mean that additional RAM could be added, but 
only in 4K blocks. The use of MCM2114's in this project 
was selected because of the MCM2114's ability to be 
added in 1K blocks, thereby reducing the initial cost of 
the project. 

The "Break" key on the board through the use of cross 
coupled NAND gates provide the NMI (Non Maskable 
Interrupt) input with a debounced key closure. Within 
the TVBUG Monitor, the NMI vector causes the current 
contents of the registers within the MPU to be displayed 
on the TV screen. 

The RESET is a normally open switch which does not 
need to be debounced due to the RC time constant of the 
3.3K O and 100 jjF capacitor, and the Schmitt trigger 
input on the MC6808. 

The MC6821 PIA is configured to receive key closures, 
from a standard ASCII keyboard. The negative going 
strobe must be at least a duration of 100 ms due to the 
type of polling used to scan for a keyboard input. 



Perhaps a more conventional way to poll the keyboard 
would have been through the use of the PIA's IRQ line; 
but by dedicating the IRQ vector to a keyboard input 
routine, the capability of using this line for a user 
function would have been lost. 

Although the ACIA in this system is dedicated to a 
Kansas City Standard tape interface unit, the inputs and 
outputs could be switched to provide the user with a 
different use for the serial I/O port. 

I n the transmit mode, the clock for the ACIA, and tone 
for the Kansas City Standard, is provided by an MC1455. 
This 4800 Hz is fed into the transmit circuitry, and when 
combined with the TX (transmit) data, provides the 
traditional 2400 Hz for a Mark (1 ) and 1 200 Hz for Space 
(0) required by the Kansas City Standard. This output 
data is not the S1-S9 data format as used by some other 
systems, but a binary format which is both faster, and 
compatible with the many Motorola MEK6800D2 kits 
now in use. The speaker audio is brought onto the board 
and fed into the input of an MC14584. This hex Schmitt 
trigger provides about 0.5 volts of hysteresis when 
operated at 5 volts, and does an excellent job of squaring 
up the incoming audio tones. Following this squaring of 
the tones, the data is processed and fed into the RX 
(receive) data pin of the ACIA. Connected to this is a 
leading edge detector which is used to reset the binary 
counter which feeds the RX clock signal. By doing the 
clock recovery in this manner, the binary counter is 
assured to be in synchronization with the data and 
provide the proper clock pulse to the ACI A at the correct 
time. 

The cassette interface provided in this documentation 
has proven to be a very effective and reliable method for 
generating and recovering data from audio tapes, while 
using only six CMOS packages. 

THE VDG AND ASSOCIATED CIRCUITRY 

The MC6847 VDG operates like a microprocessor. It 
accesses its own RAM by putting out the specific 
addresses on the bus. Because of this, the VDG address 
bus must be separate from the MPU's address bus, but 
both must have the ability to address the common 
display RAM. By using the 8T97 tri-state buffers on the 
address lines, wherever the "A", signal goes low, 
signifying that the MPU is talking to the display RAM, the 
VDG is turned off. In addition, the bidirectional data bus 
buffers must have the same type of control. The other 
inverters and NAND gates (U19-A, B and U16-A, B, C) 
provide the display MCM2114's with the correct R/W 
signal. The VDG directly generates the chrominance 
and luminance analog (R-Y, B-Y, Y) output levels to be 
fed to the MC1372 Radio Frequency (RF) modulator. 

The new MC1372 modulator contains a chroma 
subcarrier oscillator (3.§79 MHz to be used as a system 
clock), and all other circuitry necessary to support direct 
RF modulation to any standard color television set. As 
shown in the schematic, the MC1372 clock is buffered 
and fed directly to the MC6847 and MC6808 EXTAL 
inputs where it is used as a system clock. This provides 
an internal system clock of approximately 895 kHz (02). 

The Tank L-C values shown (56 pF and .1//H) will 
provide a center frequency of 67.25 MHz (channel 4). 
The component values required for channel 3 



operations are 75 pF and A/jH. This provides a center 
frequency of 63 MHz. The 75 O output may be fed 
directly to the set, or through a 75 to 300 O matching 
transformer available wherever televisions or electronic 
components are sold. Either method MUST include a 60 
dB switch to minimize RF radiation problems (TVI). This 
assures that the antenna is disconnected while using 
TVBUG. 

CONSTRUCTION HINTS 

There are several devices on the schematic which 
require adjustment, these include L1, R10, C4, and R6. 
The following is a "tune-up" procedure for these. 

The value of L1 determines the frequency of 
operation, in other words, which channel you are on. 
This coil can be bought as a A^H tuneable coil, or 
fabricated on almost any type of coil form which uses a 
ferrite slug for tuning. The prototypes were made on 
forms 1/8 inch in diameter with 3 1/2 turns #30 gauge 
wire wrap wire. After the coil has been made and placed 
in the circuit, turn the television on to the desired 
channel (3 or 4), and turn the slug until a picture is 
presented on the screen. If all that is seen is "confetti" on 
the set, the coil could possibly be resonating at the 
wrong frequency. Change the channels until a picture is 
seen. Turning the slug down into the coil lowers the 
frequency (and channel), and unscrewing it produces 
the opposite effect. If the picture is seen at a channel 
which is not desired, adding more turns (one ortwo) will 
lower the frequency. 

The duty cycle adjustment varies the actual duty cycle 
of the 3.58 MHz clock. This is an optional part, as the 
MC1372 is internally set for a 50% duty cycle. 
Adjustment should be made while observing a picture, 
and tuning the pot until the best picture is obtained. 

Y1's frequency adjustment trimmer, C4, should be set 
for 3.57954 MHz with a frequency counter, or adjusted 
until the television set responds with the correct colors. 

The audio cassette standard has an adjustment, R10, 
which should be tuned for best data at pin 2 of the ACI A. 
This adjusts a time constant, and some chopping of the 
waveform will be noticed until this adjustment has been 
made. 

Care should be taken in parts placement, as there are 
several areas where there are low level analog signals 
present. Fast digital signals do a good job of interfacing 
with these, so keep as much space as possible between 
them. Also be sure to adequately bypass as shown on 
the schematic. 

Conclusions; This minimum configuration provides 
the user with a software and low density (64 X 32 
element) color graphics development system. By 
expanding this system with a minimum number of 
components and enough support RAM (both display 
and user RAM), a full color graphics system can be 
implemented for any type of home computer, game, or 
low cost color graphics system. 

II. TVBUG 1.2 SOFTWARE 

The TVBUG software monitor is provided in the 
MC6846 combo chip along with an eight-bit parallel 
interface and a programmable timer. It is designed to 
implement the MC6847 and MC1372 in a 



MC6800/01/02/03/08 based system. Micro Chroma 68 
provides the user with an operating/debug system, 
parallel interface to an ASCII keyboard, a Kansas City 
Standard for an audio cassette interface, and an 
interface to an unmodified color TV receiver. 



HARDWARE CONFIGURATION MEMORY MAP 





FFFF 
TVBUG 
F800 






F7FF 
I/O 
F400 






F3FF 
STACK 
FOOO 






EFFF 
USER DEFINED 
E800 






E7FF 
DISPLAY RAM 
D000 






CFFF 
USER DEFINED 
0000 





NOTE: All addresses are in hexidecimal. 



SOFTWARE OPERATION 

The operating procedure for each command is given 
in the following paragraphs. All of these commands 
assume that the system is under TVBUG firmware 
control and the last data displayed on the screen was 
"TVBUG" followed by a carriage return-line feed 
(CRLF), and a blinking cursor. 

RESET FUNCTION 
The RESET function is used when power is first 
applied, anytime TVBUG firmware loses program 
control, and before a PUNCH, LOAD or VERIFY 
command is used. To use this function: 

Press the reset switch. TVBUG firmware will gain 
program control and display "TVBUG" followed by 
CRLF and blinking cursor. The TVBUG monitor is 
ready for an input. 

TVBUG COMMANDS 
The following are TVBUG commands. Each command 
is one letter followed by an optional modifier (address or 
data). The modifier is always hexadecimal with leading 
zeros assumed. The modifying field is terminated with a 
non-hex entry (e.g. space bar). The modifier will be 



either two or four hex digits depending on the command 
mode. The TVBUG firmware may be used to debug 
and evaluate a user program and to perform the 
following functions: 

1) G — GO TO ADDRESS "N" (USER PROGRAM) 

2) L — LOAD KANSAS CITY STANDARD TAPE 
(J-BUG FORMAT) 

3) P — PUNCH DUMP KANSAS CITY STANDARD 
(J-BUG FORMAT) 

4) V — VERIFY KANSAS CITY TAPE 

5) M — MEMORY CHANGE 

6) E — EXAMINE A BLOCK OF MEMORY 

7) Q — QUICK LOAD OF HEX DATA 

8) F — FILL A BLOCK OF MEMORY 

9) O — OFFSET CALCULATION 

10) R — DISPLAY CONTENTS OF MPU REGISTERS 

11) Z — CLEAR SCREEN AND INITIALIZE I/O 

12) S — SET A BREAKPOINT WITH ADDRESS "N" 

13) U — UNSET BREAKPOINT WITH ADDRESS "N" 

14) D — DELETE ALL BREAKPOINTS 

15) B — PRINT OUT ALL BREAKPOINTS 

16) N — TRACE THE NEXT INSTRUCTION 

17) C — CONTINUE EXECUTION FROM THE 
CURRENT LOCATION 

18) T — TRACE "N" INSTRUCITONS 

19) !, # — USER DEFINED FUNCTIONS 

G — Go To User Program Function 

This function allows the user to exeucte a USER 
program. To use this function type a "G", starting 
address, and return. The firmware will execute a USER 
program. 

L — Load Function 

This function allows the user to load a Kansas City 
Standard formatted audio cassette tape. This includes 
tapes punched using Motorola's J-Bug monitor. To use 
this function: 

1 . Press Reset 

2. Type "L". The firmware will CRLF and ask for an 
offset, (16 bits, Hexadecimal, with leading zeros 
assumed). 

3. Type "return". Start the tape by pressing "play" on 
the cassette recorder. Insure that the recorder 
"ear" to P.C. board "ear" is connected. 

4. After approximately 40 seconds of leader, the firm- 
ware will print a name if any, and a "B" for each 256 
bytes and a "B" for the remainder, if any. If the data 
was not stored into memory correctly, the "B" is 
followed by the message, "MEMORY BAD" and the 
firmware will return to TVBUG program control. 

P — Punch Dump Function 

This function allows the user to store data from 
memory on audio cassette tape using the Kansas City 
Standard. To use this function: 

1 . Press Reset. 

2. Type "P". The firmware will CRLF and ask for a 
beginning address. 

3. Enter beginning address and type a space. The 
firmware will ask for a ending address. 

4. Enter ending address. The firmware will CRLF and 
ask for a name. 

5. Enter the name. The name may be up to thirty-two 



(31 +CR) characters long. If tape must be read by a 
J-Bug monitor, do not use "B" or "G" in the name 
as these characters are interpreted by the J-Bug 
firmware as control characters. 

6. Connect the tape recorder to the P.C. board "mike" 
to "mike" and start recording. 

7. Type return. The firmware will print leader (F's), 
followed by an 80 (Start Char.), Name (ASCII 
Code), Byte count, Starting Address, and "42" 
(ASCII "B") followed by data. A short leader 
terminated with "42" (ASCII "B") will be printed for 
each 256 bytes. 

V — Verify Kansas City Tape 

This function is used to verify a PUNCH or 
LOAD operation. To use this function: 

1. Press Reset. 

2. Enter a "V". The firmware will CRLF and ask for an 
offset. 

3. Enter the offset. The offset must be the difference 
between the existing start address and the desired 
start address; if none, type a space. 

4. Set up the tape recorder as shown in the load 
function. 

5. The firmware will print file name, CRLF, and printa 
"B" for each 256 bytes. If the data on the tape and 
the contents of the memory do not agree, the 
firmware will print "MEMORY BAD" and return to 
TVBUG program control. 

M — Memory Change Function 

This function will examine a location in memory, 
change the contents if desired, and return the contents 
to memory in that order. To use the MEMORY CHANGE 
function: 

1. Enter an "M". 

2. Enter the address to be changed and press line 
feed. TVBUG firmware will CRLF and print the 
address followed by data. 

3. Enter new data if desired. Line feed will then return 
data to memory and open the next location. Up 
arrow (/s) will return data to memory and open 
location minus one. To return to TVBUG control 
program, press the return key. 

TVBUG 
M O 

0000 XX 00 

0001 XX 00 
TVBUG 

E — Block Memory Examine Function 

This function allows the user to display a block of 
memory on the screen. To use this function: 

1. Enter an "E". 

2. Enter the beginning address of the block to be 
examined and type a space. The firmware will 
ask for ending address. 

3. Enter an address and type a space. 

4. The firmware will CRLF and print the beginning 
address and contents of the first eight memory 
locations. Underneath the contents of each 
location is a period. If the data at that location 
is an ASCII character, the character will be 
printed underneath the data. Each time a space 
is entered, the next eight locations will be 



printed until it reaches the ending address; at 

which time the firmware will return to the 

TVBUG control program. 

TVBUG 

E 

BEG ADR? 0 END ADR?£ 



0000 54 56 20 42 55 47 XX XX 

TV BUG.. 
0008 XX XX XX XX XX XX XX XX 
TVBUG 

Q — Quick Load Function 

This function allows the user to enter blocks of hex 
data using the MEMORY EXAMINE function. To use this 
function: 

1 . Type "Q". The firmware will CRLF and ask for the 
beginning address. 

2. Enter beginning address and type a space. The 
firmware will ask for the ending address. 

3. Enter ending address and type return. The 
firmware will CRLF, print the beginning address 
and wait for data. 

4. Enter hex data followed by a space. The firm- 
ware will CRLF on the eighth location, print the 
address and wait for data. When the ending data 
has been entered, the firmware will return to 
TVBUG control program. 



Typical Display: 

TVBUG 

Q 

BEG ADR? 0 END ADR? F 

0000 XX XX XX XX XX XX XX XX 
0008 XX XX XX XX XX XX XX XX 
TVBUG 

F — Memory Fill Function 

This function allows the user to fill a block of memory 
with a character. To use this function: 

1. Enter an "F". The firmware will CRLF and ask for 
the beginning address. 

2. Enter the beginning address and type a space. 
The firmware will ask for an ending address. 

3. Type a space. The firmware will CRLF and ask 
for a character. 

4. Enter the desired character and type return. The 
firmware will write the character into each of the 
defined memory locations and return to TVBUG 
program control. 

Typical display for MEMORY FILL function: 

TVBUG 
F 



BEG ADD XXXX END ADD XXXX 
CHAR? XX 
TVBUG 



O — Offset Calculation Function 

This function allows the user to calculate sixteen bit 
offsets. If the offset is outside the eight bit "branch" 
limits, the firmware will print the offset followed by the 
message "TOO FAR". This function simplifies the 
calculation of offsets for branch instructions. To use this 
function: 

1. Type an "O". This firmware will CRLF and ask for 
the beginning address. 

2. Enter the address of the branch op code and 
type a space. The firmware will CRLF and ask for 
the ending address. 

3. Enter the address of branch destination and type 
return. The firmware will CRLF, print the offset 
and return to TVBUG control program. Offsets 
will be printed as a sixteen bit word. The least 
significant eight bits will be the offset. 

1) Positive Offset: 

O 

BEG ADR? jO END ADR?_F 
OFFSET = 000D 
TVBUG 

2) Negative Offset: 

O 

BEG ADR?_F END ADR?_0_ 
OFFSET = FFEF 
TVBUG 

3) Offset Outside of an eight bit branch: 

O 

BEG ADR? 0. END ADR? 82 
OFFSET = 0080 TOO FAR! 
TVBUG 

R — Print contents MPU Registers 

This function allows the user to examine the MPU 
registers by reading them from the stack. To use this 
function type "R". The firmware will place contents of 
the MPU registers onto the stack RAM and then place 
them on the screen in the following format: 

CC B A X P S 

XX XX XX XXXX XXXX XXXX 
Where: 

CC = condition code register 
B = B accumulator 
A = A accumulator 
X = index register 
P = program counter 
S = stack pointer 

Z — Clear Screen Function 

To use this function type "Z". The firmware will fill the 
display memory block with a space character, clear the 
screen, initialize the system I/O ports, and return to 
TVBUG program control. 

BREAKPOINTS 

There are seven TVBUG commands dealing with 
breakpoints. 

1. S — SET BREAKPOINT WITH ADDRESS "N" 



2. U — UNSET BREAKPOINT WITH ADDRESS "N" 

3. D - DELETE ALL BREAKPOINTS 

4. N - NEXT INSTRUCTION 

5. T — TRACE "N" INSTRUCTIONS 

6. C — CONTINUE EXECUTION FROM CURRENT 
LOCATION 

7. B — PRINT OUT ALL BREAKPOINTS 

S — Set A Breakpoint With Address "N" 

To set a breakpoint type an "S" followed by the 
address, then type return. The firmware will print the 
breakpoint address with up to seven additional 
breakpoints that might be set, and return to TVBUG 
program control. 

NOTE: Breakpoint 0000 is illegal. 

Typical display for Setting Breakpoints: 

TVBUG 

S 10 

0010 

TVBUG 

S20 

0010 0020 
TVBUG 
S 30 

0010 0020 0030 
TVBUG 

U - Unset A Breakpoint With Address "N" 

To unset a breakpoint type a "U" followed by the 
address, then return. The firmware will remove the 
breakpoint and return to TVBUG control program. 

Typical Display for Unsetting Breakpoints: 

TVBUG 

U 10 

TVBUG 

U 20 

TVBUG 

D — Remove All Breakpoints 

To remove all breakpoints, type a "D". The firmware 
will remove the breakpoints and return to TVBUG 
program control. 

B — Print Out All Breakpoints 

To examine breakpoints type a "B". The firmware will 
print all breakpoints and return to TVBUG control. 
NOTE: The following commands assume that a program 
has been executed and halted at a breakpoint. 

N — Trace The Next Instruction 

This command allows the user to single step through a 
series of instructions. To use this command, type an "N". 
The firmware will execute the NEXT instruction and 
print the contents of the MPU Registers. It will then 
return to TVBUG program control. 

Typical Display for NEXT Instruction: 

XX XX XX XXXX 0030 XXXX 

TVBUG 

N 

XX XX XX XXXX 0032 XXXX 

TVBUG 



C — Continue 

The CONTINUE command is used to step the 
program from breakpoint to breakpoint. To use this 
command, type a "C". The firmware will execute the user 
progam from the current location to the next breakpoint, 
and print out the contents of the stack. 

Typical Display for CONTINUE Instruction: 
(Breakpoints set at 0030, 0040, 0050) 



XX 

c 


XX 


XX 


XXXX 


0030 


XXXX 


TVBUG 


XX 


XX 


XX 


XXXX 


0040 


XXXX 


TVBUG 


c 

XX 


XX 


XX 


XXXX 


0050 


XXXX 


TVBUG 



T — Trace "N" Instructions 

This command works exactly like the NEXT 
command, except that after entering "T" the firmware 
will ask for the number of instructions to be traced. Enter 
the hexadecimal number and the firmware will print out 
contents of target stack at each instruction. Then it will 
return to TVBUG program control. 

Typical Display for TRACE Instructions: 

TVBUG 



XX 


XX 


XX 


XXXX 


0030 


XXXX 


T3 












XX 


XX 


XX 


XXXX 


0033 


XXXX 


XX 


XX 


XX 


XXXX 


0036 


XXXX 


XX 


XX 


XX 


XXXX 


0039 


XXXX 



USER DEFINED FUNCTIONS 

TVBUG contains three user defined jumps that may be 
called from the keyboard and two user defined jumps 
called by the monitor. All jumps are initialized with a 
RESET. However, if the user wishes to prevent these 
vectors from being lost on RESET, the stack RAM may 
be hardware deselected from F390 to F29F inclusive and 
a small ROM, containing the permanent vectors, 
patched over these locations (see listing). 

To use the keyboard jumps, type the appropriate 
character (!, ", #). Firmware will then execute the 
program from the address stored in temporary RAM at 
the following locations: 

CHAR. INST. (7E) HIGH BYTE LOW BYTE 
! F396 F397 F398 

F399 F39A F29B 

# F39C F39D F39E 



USER INPUT FUNCTION 

This function allows the user to insert a user routine 
into the monitor input loop. Each time the monitor goes 
around its input loop it checks the user input three byte 
vector. Since it is initialized to RTS, the monitor will 
ignore this vector until the user changes it. The three 
temporary RAM locations' reserved for the user input 
vector are: 

INST. (7E) HIGH BYTE LOW BYTE 
F390 F391 F392 

To use this function, first write user vector into 
stack. 



Example: 

LDAA: User vector (High Byte) 
STAA: $F391 

LDAA: User vector (Low Byte) 

STAA: $F392 

LDAA: #$7E 

STAA: $F390 

Initialization complete 
If this vector is entered with the keyboard, 
the jump instruction (7E) must be entered 
last. 

The USER INPUT routine must set the carry bit if there 
was a user input. If there was no input it must clear the 
carry bit. All user I/O routines must end with RTS. 

USER OUTPUT FUNCTION 

This function allows the user to insert a user output 
routine into the monitor output routine. Each time the 
monitor performs its OUTCH (output character) routine 



it checks the three temporary RAM locations reserved 
for the user output vector. 

Since these locations are initialized to RTS, the 
monitor will ignore them until they are changed by the 
user. 

INST. (7E) HIGH BYTE LOW BYTE 
F393 F394 F395 

To use this function, write the jump vector into 
temporary RAM. If the vector is left in temporary RAM, 
I/O devices such as a printer or modem may be 
controlled on the fly by changing the instruction 
location (F393) from the jump (7E) to RTS (39). All user 
I/O routines must end with RTS. 

The following software listing contains the monitor 
jump table and temporary RAM locations as well as 
other useful routines. 

Only the jump table and temporary RAM locations will- 
be guaranteed on future versions of TVBUG. Caution 
should be exercised when using any other routines. 



FLOW CHART FOR USER INPUT FUNCTION 





FLOW CHART FOR USER OUTPUT ROUTINE 




OUTPUT TO 
PRINTER, PUNCH, 
MODEM, ETC. 



RTS 



TVBUG1 ft VDG MONITOR FOR 68©Q, 81, 62, 83, ©8, 



SYSTEMS 



NAM T'v'BUQ 

TTL ft VOG MONITOR FOR 68O0j 0 / .. 02, 03, OS 
REV i 

COPYRIGHT ( C > 1978 BY JOHN DUMAS 
FOR tiQTQRQL.fi INC. 
6 APR ?'& 



TVBUG <TM> MOTOROLA 



AUSTIN.. TEXAS 

MICROCOMPUTER CAPITAL OF THE WORLD! 

CURRENT REVISION DATE = SEPT BS 1978 

1--QLLQNING FlRE TVBUG COMMANDS 

EfiCH COMMRND IS i LETTER FOLLOWED 
BY FIN OPTIONAL MODIFIER ( ADDRESS OR 
DATA). MODIFIER IS ALWAYS HEX HI TH 
L EflD I NG ZERO< S > ASSUMED . MOD I F IER 
FIELD IS TERMINATED WITH h NON- 
hEX EN TR Y< I.E. SPACE BHR > . MOD I F I E R 
WILL BE EITHER £ OR 4. HEX DEPENDING 
UPON COMMAND MODE . 



L LQftD K.C. STANDARD THFE <D2 FORMAT) 

M MEMORY CHHNGE 

P PUNCH K.C. STANDARD TflPE <D2 FORMA T ) 

R DISPLAY CONTENTS OF THRGET STACK 

CC B fl X P S 

B PR IN T OU T HLL BREHKPOl N TS 

F FILL MEMORY BLOCK 

C CONTINUE EXECUTION FROM CURRENT LOCATION 

N NEXT INSTRUCTION TRACE 

T TRACE "AT INSTRUCTIONS 

G GO TO LOCATION "N" 

D DELETE HLL BREAKPOINTS 

U UNSET BREAKPOINT WITH ADDRESS 'H' 

E EXAMINE BLOCK OF MEMORY 

Q QUICK LOAD OF HEX DATA 

0 OFFSET CALCULATION (BRANCH) 

S SET A BREAKPOINT WITH ADDRESS 'H' 

V VERIFY KC TAPE <D2 FORMAT) 

Z CLEAR TV SCREEN 

! USER FUNCTION #/ 

" USER FUNCTION #2 

# USER FUNCTION #J 



"ALTHOUGH THE INFORMATION CONTAINED HEREIN, AS WELL AS ANY INFORMATION PROVIDED 
RELATIVE THERETO, HAS BEEN CAREFULLY REVIEWED AND IS BELIEVED ACCURATE, MOTOROLA 
ASSUMES NO LIABILITY ARISING OUT OF ITS APPLICATION OR USE; NEITHER DOES IT CON- 
VEY ANY LICENSE UNDER ITS PATENT RIGHTS NOR THE RIGHTS OF OTHERS." 



JUMP TPBLE TO NUN I TOR 



F880 


?E 


FEE! 


hi 




JriP 


INCH I 


INPUT CHRP 


F803 


7E 


FFBF 


fl 




JMP 


OUT CHl 


OUTPUT CHfiR 


F886 


?E 


F995 


8 




JMP 


POP TP i 


OUTPUT STRING 


F899 


7E 


F929 


a 




JfiP 


BFiDOR 


INPUT HEX 


FS0C 


7E 


FEC9 


ft 




J MP 


SCROLL 


UP i LINE 


F89F 


I- t 


hJ89 


p 




JfiP 


UU 1 4HS 


UUlPUl 4 HEfi+brHLt 


F8I 2 


?E 


F9B2 


fi 




JMP 


00T2HS 


0OTP0T 2 HEX+SPPCE 


F8I5 


?E 


FFflS 


P 




JMP 


ini r 


CLEPR SCREEN 


ro i o 


i L 




n 




JMP 


GETftDR 


ut / — ■ / htk 1 &• 1 Ut nUk 


F8I8 


7E 


FF7F 


i-i 




JMP 


SflVE 


SPVE PREQ 9,X 


F8IE 


?'£ 


FE86 


hi 




JMP 


SYNCLb 


LOPO PRE 0 9,X 


F82 1 


7E 


FB29 


fi 




.mp 


CONTRL 


REST PR T POINT 










INTERRUPT VECTORS 








FFF8 








ORG 


8liS0RG+$ffS 






FFF8 




F824 


Pi 


FDB 


10 






FFFFl 




F82E 


Fl 


Fi-'B 


SFEI 






!~ /" h L" 




FS29 


P 


FOB 


PONBNN 






FFFE 




FPBf 


Fl 


FDB 


STPRT 



THE FOLLOWING PRE INI ML IZED NT S TNR 7 



F3ffl 


6992 


P 


IOV 


RMS 




I/O INTERRUPT POINTER 


F37C 


0062 


Fl 


BE OP 


RUB 


2 


PR IN t /PUNCH 5 TPRT LOC 


F3?£ 


0092 


fi 


ENDfi 


RUB 


2 


PRINT PUNCH STOP LOC 


F386 


B0Q2 


ft 


NIB 


RUB 


2 


NM IN TERROR T POi N TER 


F382 


9992 


fl 


SP 


RMS 


2 


USER ST NCR POINTER 


F384 


0092 


Fl 


SRI I 


RUB 


2 


LEVEL I SNi VECTOR 


F38b 


9992 


fi 


SNI2 


RMB 


2 


LEVEL 2 SUFI VECTOR 


F38S 


9098 


P 


BR INS- 


RUB 


8 


BONO BRRNCH STORBBE 








USER 


I/O VECTORS 










W 11 PL I ZED ) 


ro RTS 










USER 


MUST END HIS 


ROUTINES 








MI TH 


RTS OR 


fiLL IS 


LOST! ! ! ! 


F399 


0003 


fi 


US ft INF 


■ RUB 


3 


USER INPUT ROUTINE 


F393 


9993 


P 


USROUi 


' RMB 


3 


USER UUTPUT ROUTINE 


F39S 


9993 


P 


* 

USRI 


RMS 


3 




F399 


0003 


Fl 


USR2 


RMB 


3 




F39C 


9904 


P 


USR3 


RMB 


4 





F3P9 H BRPNEN EQU * 



! : .:$cs 


699 / 


fi 


PiSff/E 


RMB 


/ 


F3C6 


£SS2 


/•; 


TEMP 


Flit: 




F3CB 


0002 


fi 


IEMP2 


RMB 




F3CPI 


6662 


fi 


SfiVEX 


RUB 


--J 


F3CC 


0962 


fi 


NEXTBY 


RMB 




F3CE 


666 1 


fi 




RUB 


1 


F3CF 


0001 


fi 


HL0i4 


RMS 


i 


P306 


6662 


ft 


SSftVE 


RUB 




r oU*2 




n 




DrVl D 
J^. / 1 L' 


i 
i 


P303 


666 i 


ft 


TERHCH 


RUB 


/ 


F304 


669 ! 


ft 


VFLftQ 


RUB 




F3D5 


6662 


fi 


Off FOR 


RUB 




F30? 


669 1 


fi 


FLfiOK 


RMB 


1 


FRIUT 


OFTh FOInTEO FT 


bY X- 


-REG 



ON Ex I T ;-/=4 .. B-UNChftNuEO .. X*X * i 



SO 
68 



F992 
F994 
F993 F6 
F99F &i 
t-999 26 
F99B 39 



22 F9B6 POUT ft 2 BSR OuTCi-i 

I NX 

96 fl POflTfil L.Ofifl X 

64 F CllF ft #4 

F? F992 BNE POflTfu 

RTS 



STOP ON EOT 



PRINT CR LF 
NO REG CHflNGEO 

F99C FF F3CE fi PCRLF S TX XHI 

F99F 86 60 fi LOfifi #$0 

FSfii SO 13 F9S6 B5R OUTCH 

F9R3 FE F3CE fi LOX XHI 

F Site 39 RTS 



ON EXIT X-XH 



SAVE. . .COPIES BYTE 

Mil IS FOR HORIZ SYNC THEN STORES IN 

OISPLPlY RFH 

NO REG KL08B2RE0 

ON ENTRY X REG POINTS TO LOC 

IN OISPLPlY MEMORY TO STORE CFlflR 

INTERRUPT IS HHSKEO BE "ORE NRITE 

TO VOG MEMORY THEN UN MRSKEO 

<NE MUST NRITE DURING TV HORIZ SYNC) 



FF7F 3? SBVE PSHB 

FF80 Of BE! 



FF&i F6 F4B6 fl SPY EC LDBB P1BB0 N1H17 FOR HS~ I 

FF84 2fi FB FFSi 8FL BfWEB 

FFB6 F6 F4BB Fl SBVE I LC'FlB PI HBO NEGRI IVE EDGE 

FFBB 2B FB FF&6 Bill SlWEI 

EON CNN SlWB ( SCREEN BlRNKED) 

FFSB BF 00 fl SiBB 6,X 

FFBD BE CLt 

FFSE 33 FULB 

FFBF 39 RfS 



FhB,X ONCHBNGED 
IGNORES LF 

CBLl.S "RE fORN " if C.F. 
CHLL.S "inn" IF FORN FEED 

CBLLS "scroll" if bot run 

OF OISPLBY RBH IS EXCEEDED 
ELSE STORES CHRP 



FFBF 3/ OUrCHi PSHB 

FFIB 36 PSHB 
FFil FF F3CB B S'/'X SBVEX 



CHECK IF END OF OISPLBY BUFF IF YES THEN SCROLL 



FF 1 4 


FE 


F3CC B NBINl 


LDX 


NEXTBY 


FFFF 


BC 


D200 B 


CPX 


m-'t>GRHIi+S 1 2 


FF i B 


26 


B3 fFIF 


ONE 


NBIN2 


FF 1 C 


BO 


FFC9 Fi 


JSP 


SCROLL 



CHECK FOR C.R. IF YES J HEN FINISH LINE HI ill BLB 
TRHP L.F. "3" 



FFIF 


Bt 


Bfl 


B HRIN2 


CHER 


#$9fi 


FF2I 


2/ 


25 


FF4B 


BEQ 


HBIN6 


FF23 


8! 


BD 


fl 


CilPB 


##£> 


FFB'3 


20 


OB 


Ft 20 


ONE 


HBIN3 


FF2? 


80 


6? 


FFBB 


BSR 


RE IURH 


FF29 


B6 


OB 


B 


LDBB 


#$BFi 


FF2B 


2B 


E? 


FF RI- 


BRB 


HBINI 



CHECK FOR FORh FEEO If YES CLEBR SCREEN 



FFBD 


&i 


BC 


R HBIN3 


CHPB 


#*0C 


FF2F 


26 


B4 


FF35 


BNE 


NBIH4 


FF3I 


BD 


FS 


FFBB 


BSR 


INIT 


FF33 


29 


13 


FF48 


BRB 


HB1N6 



CHECK FOR SACK SPACE IF YES MOVE PCUNTR BfiCK 
& S TORE INVERTED BLANK 



t r ' 


o i 


88 


H HAIN4 


L'l irtl 




FF37 


26 


0C 


FF45 


SHE 


MAINS 


FF39 


SC 


0000 A 


CPX 


VVDGRRI' 


FF3C 


27 


OA 


FF4B 


BEQ 


MAINS 


FF3E 


09 






DFX 




FF3F 


06 


60 


A 


LOAA 


#$60 


FF4 / 


80 


30 


FF?F 


BSR 


SAVE 


FF43 


20 


03 


FF48 


BRA 


cm iii6 



GET HERE TO SiWE THE BEQQHR . . THEM HOME 

IF TEXT DISPLAY BLACK CHAR ON GREEN BACKGROUND 

ELSE STORE AS IS 



FF-15 
FF4? 
FF4& 
EF4B 
FF4E 
PF4F 



00 
OS 
FF 
FE 
32 
33 



FF45 Ft 
30 FF?F 



F3CC 
F3CH 



Fi 
Fi 



HHIN5 



HAIN6 



EOU 
BSR 
I NX 

srx 

LOX 

PUiJ : l 

POLS 



SAVE 

NEXT BY 
SAYEX 



FF50 7E F393 Fi 



mm oo ro users display routine 

. . .NOTE USER HOST EXECUTE Fi RTS 
HS LOST INS 

J HP USROUT 



FEE! 
FEE4 
FEES 
FEE 7 
FEES' 



FF 
3? 
80 
BO 
FE 



NON CHECK KEYBOARD 
ON EXIT INPUT CHOP 



F3CFI P INCH I 



83 FE6H 
PC PE9S 
F3CP A 



I NO HO 



S IX 

PSHB 

BSR 

BSR 

LOX 



SBVEX 

Bi. INK 

CURSOR 

SHVEX 



IN A- REG 



FLASH CURSOR 



FEEC B6 F404 A 
FEEF 2B iO FFOi 
FEE I Bi F30? FI 
FEF4 27 &E FF04 



FEE 6 Bi IB A 
FEFB 2? 12 FFOC 

FEE A 8? F3D? A 
FEED SO 10 FFBF 
FEFF 33 
FFB0 39 



LOAN 
Bill 
CNPFi 
BEQ 



P I HAD 
NONE 
FLAOK 
SHOE 



LOOK FOR ANY KEY 

SANE KEY 

FROH LAST TINE? 



CHECK FOR ESCAPE FUNCTION 



CHPA 
BEQ 

ST A A 
BSR 
PULB 
RTS 



CAT LEY 

FLAOK 
OUT CHI 



ECHO CHAR 



NO K£Y CLOSED HON GO TO USER ROUTINE 
IF USER imS KEY OONN 

RETURN NiJH CNEiR IN H REG 
mm CORNY - / 
ELSE RETURN /-•//'/ 77 CURRY ~0 



FEB / 
FF04 
FF05 
EEOO 
FF0N 
EE0B 



?F 

0C 

BO 
24 
33 
39 



F3D? 0 

F390 fi 
L>& FEES 



NONE 
Sit HE 



CLR 

CLE 

JSR 

EEC 

PULB 

RIS 



FLElQK 

USRINP 
INCNU 



FF0C FE FBE0 H EN T LEV JnP 



CON 7 RE 



TV BUG PARTS LIST 
Integrated Circuits: LSI, MSI, SSI 



QTY 


PART # 


FUNCTION 


1 


MC6847P 


VDG 


1 


MC6808P 


MPU 


1 


MC6821P 


PIA 




I'lO DOH Or O 


TV Rllft_RT/nT 
1 V DUla-K 1/ U 1 


1 


MC6850P 


AC I A 


6 


MCM2114 


RAM 


1 


MC1372P 


RF MODULATOR 


2 


MC6887P 


8T97 


2 


MC6889P 


8T28 


3 


MC74LS138P 


3 TO 8 DECODER 


3 


MC74LS00P 


QUAD NAND 


1 


MC74LS04P 


HEX INVERTER 


1 


MC1455P 


OSCILLATOR 




Integrated Circuits: 


CMOS 



MANUFACTURER 
MOTOROLA 



DESIGNATION 

U3 
Ul 
U2 
U4 
U15 
U9-U14 
U20 
U5, U6 
U7, U8 
U28, U29, U30 
U17, U18, U19 
U16 
U27 



MC14013BP 
MC14040BP 
MC14584BP 
MC14070BP 
MC14001BP 



DUAL D F-F 
12 BIT COUNTER 
SCHMIDT HEX. INV. 
EXOR 
NOR 



MOTOROLA 



U25, U26 
U24 
U22 
U21 
U23 



Resistors (1/4W, +5% composition): 



QTY 


VALUE: (SL) 


DESIGNATION 


3 


240 


Rl, R2, R3 


2 


5.6K 


R7, R14 


1 


75 


R4 


1 


22K 


R9 


1 


370 


R15 


1 


750 


R5 


2 


10K 


R8, R13 


1 


2K 


R19, R26 


2 


20K 


Rll, R12 


6 


3.3K 


R18, R21, R22 






R20, R23, R24 


1 


IK 


R17 


1 


100K 


R16 


1 


510 


R25 



Adjustable Resistors (1 Turn, Carbon Film, 110%) 



1 
1 



10K 
20K 



R6 
RIO 



Capacitors (in microfaroads, 25WVDC + 10%, Ceramic): 



QTY 



VALUE 



DESIGNATION 



12 



0.01 

100 (electro- 
lytic) 16V 
50pF 
0.1 
.001 
.002 
2700pF 
1500pF 
56pF 



Misc. Components 

QTY COMPONENT 



CI, C2, C9, C12, C13, C14, 
C15, C16, C17, CIS, C19, C20 
C15, C21 

C5 

C6, C8, Cll, C22, C23 

C7 

C14 

CIO 

C13 

C3 



Variable Capacitor 9 to 35pF 
Crystal 3.57954 MHz 
Transistor 2N2222 
Keyboard-Cherry B70-05AB 
Switch Momentary B8600 
Switch, DPDT, 
60dB separation 
<a RF 

Transformer, 
75 to 300 
Diodes, IN 914 



DESIGNATION 

C4 
Yl 
Ql 

SI, S2 



S3 
Tl 

Dl 9 D2 



MICROCHROMA 68 PARTS LIST 



MICROCHROMA 68 PARTS LIST (CONTINUED) 



MICROCHROMA 68 KITS PARTS LIST (CONTINUED) 



Quantity 


Ref Des 


Value 


43 


C1-C3, C7, CIO, C13, 


.luF 




C15, C20-23.C26-57 




2 


C4, C58 


100 uF 9 16V Electrolytic 


1 


C5 


9-36pF "Variable 


1 


C6 


50pF 


4 


C8, Cll, C14, C19 


.OluF 


1 


C9 


,002uF 


1 


C12 


56pF 


2 


C16, C25 


lOOOpF 


1 


C17 


,02uF 


1 


C18 


1500pF 


1 


C24 


2700pF 


Resistors (1/4W) 




1 


Rl 


5k Pot 


1 


R2 


10k Pot 


1 


R3 


510 


1 


R4 


22k 


6 


R5, RIO- 12, R29, R30 


3.3k 


1 


R6 


15k 


1 


R7 


33k 


2 


R8, R13 


5.6k 


1 


R9 


360 


3 


R14, R15, R18 


240 


1 


R16 ' 


75 


1 


R17 


750 


2 


R19, R34 


10k 


8 


R20, R23-25, R28, R31-33 


100k 


1 


R21 


Ik 


2 


R22, R27 


2k 


1 


R26 


20k 



Motorola Integrated Circuits 
Quan- 



Miscellaneous Components 



nti ty 


Ref Des 


P/N 


Description 


1 


Ul 


MC14584B 


CMOS Hex Schmitt Trigger 




U2, U12 


MC14013B 


CMOS Dual D Flip- Flop 


1 


U3 


MC6850* 


NMOS Asynchronous Communi cations Interface 
Adapter (ACIA) 




U4 


MC6847* 


NMOS Video Display Generator (VDG) 




U5 


MC1372* 


Linear Color TV Video Modulator Circuit 




U6 


MC14070B 


CMOS Quad Excl us ive-OR Gate 




U7 


MC14040B 


CMOS 12-Bit Binary Counter 




U8 


MC1455 


Linear Timing Circuit 




U9 


MC6820/6821* 


NMOS Parallel Interface Adapter (PIA) 




U10, U13, U15 


SN74LS00 


TTL Quad 2- Input NAND Gate 




Ull, U14 


SN74LS04 


TTL Hex Inverter 




U16 


MC6846P3* 


ROM, I/O, Timer (RIOT) w/TVBUG 1.2 Monitor 




U17, U18 


MC6887/ 8T97 


Linear Hex Three-State Buffers 




U19, U22-24 


SN74LS138 


TTL 3-to-8 Line Decoder 




U20 


SN74LS21 


TTL Dual 4-Input AND Gate 




U21 


MC14001B 


CMOS Quad 2- Input NOR Gate 




U25 


MC6808* 


NMOS Microprocessor (MPU) with Clock 


2 


U26, U27 


MC6889P/8T28 


Linear Quad Bus Transceiver 


2 


U28, U29 


SN74LS08 


TTL Quad 2- Input AND Gate 


30 


U30, U59 


MCM21 14-45 


NMOS IK x 4 Static RAM 



Quan' 



ity Ref Des Description 

51 Momentary SPDT (Break) 

52 Momentary SPST (Reset) 

53 DPDT Switch (60dB <? RF) 

Yl 3.579545 MHz Crystal 

Ql 2N2222A Transistor 

Cherry "Pro" Keyboard (Cherry P/N B70-05AB) 
or equivalent with interface cable terminated 
with 24-pin header compatible with Jl 

LI .luH adjustable Inductor 
Tl 75 to 300 Matching Transformer 
P2 Phono plug with compatible RF interconnect cable 
P3, P4 Phono plugs with compatible audio interconnect 
cable 

Vesti gal Sideband Filter tuned to pass desired 
channel frequency 

PCB* Mi croChroma 68 Printed Circuit Board (Motorola 
P/N SCPR0M02PCB) 

Dl, D2 IN914 Serial Diode 



Included in MICROCHROMA 68 Kits (Motorola P/N SCPR0M02PCB) 



♦Included in Mi croChroma 68 Kits (Motorola P/N SCPR0M02) 



MicroChroma 68 Assembly Parts List 



Capacitors 



Ref Des 


Value 




Ref Des 


CI 


.luF 




C30 


C2 


.luF 




C31 


C3 


.luF 




C32 


C4 


lOOuF (i 


i 16V Electrolytic 


C33 


C5 


9-35pF 


Variable 


C34 


C6 


5QpF 




C35 


C7 


.luF 




C36 


C8 


.OluF 




C37 


C9 


.002uF 




C38 


CIO 


.luF 




C39 


Cll 


.OluF 




C40 


C12 


56pF 




C41 


C13 


.luF 




C42 


Cl4 


.OluF 




C43 


C15 


.luF 




C44 


C16 


lQGGpF 




C45 


C17 


.02uF 




C46 


C18 


1500pF 




C47 


C19 


.OluF 




C48 


C20 


.luF 




C49 


C21 


.luF 




C50 


C22 


.luF 




C51 


C23 


.luF 




C52 


C24 


2700pF 




C53 


C25 


lOOOpF 




C54 


C26 


,luF 




C55 


C27 


.luF 




C56 


C28 


.luF 




C57 


C29 


.luF 




C58 



Value 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

.luF 

lOOuF ? 16V Electrolytic 



MicroChroma 68 Assembly Parts List (Continued) 



Resistors (1/4W) 



Ref Des 


Value fntimc^ 


Rl 


5k Potentiometer* 


R2 


10k Potentiometer* 


R3 


510 


R4 


22k 


R5 


3.3k 


R6 


15k 


R7 


33k 


R8 


5.6k 


R9 


360 


RIO 


3.3k 


Rll 


3.3k 


R12 


3.3k 


R13 


5.6k 


R14 


240 


R15 


240 


R16 


75 


R17 


750 



Ref Des 


Value (Ohms) 


R18 


240 


R19 


10k 


R20 


100k 


R21. 


lk 


R22 


2k 


R23 


100k 


R24 


100k 


R25 


100k 


R26 


20k 


R27 


2k 


R28 


100k 


R29 


3.3k 


R30 


3.3k 


R31 


100k 


R32 


100k 


R33 


100k 


R34 


10k 



*1 or 10 turn linear taper 



Motorola Integrated Circuits 

Ref Des P/N Description 

■ Ul MC14584B CMOS Hex Schmitt Trigger 
U2 MC14013B CMOS Dual D Flip-Flop 

U3 MC6850** NMOS Asynchronous Communications Interface Adaptor (ACIA) 

U4 MC6847** NMOS Video Display Generator (VDG) 

U5 MC1372** Linear Color TV Video Modulator Circuit 

U6 MC14070B CMOS Quad Exclusive-OR Gate 

U7 MC14040B CMOS 12-Bit Binary Counter 

U8 MC1455 Linear Timing Circuit 

U9 MC6820/MC6821**NM0S Parallel Interface Adapter (PIA) 



♦♦Included in MicroChroma 68 Kit Motorola P/N SCPR0M02 



MicroChroma 68 Assembly Parts List (Continued) 



Ref Des 


P/N 


Description 


U10 


SN74LS00 


TTL Quad 2- Input NAND Gate 


Ull 


SN74LS04 


TTL Hex Inverter 


U12 


MC14013B 


CMOS Dual D Flip-Flop 


U13 


SN74LS00 


TTL Quad 2- Input NAND Gate 


U14 


SN74LS04 


TTL Hex Inverter 


U15 


SN74LS00 


TTL Quad 2-Input NAND Gate 


U16 


MC6846P3** 


NMOS ROM, I/O, Timer (RIOT) with TVBUG 1.2 Monitor Program 


U17 


MC6887/MC8T97 


Linear Hex Three-State Buffers 


U18 


MC6887/MC8T97 


Linear Hex Three-State Buffers 


U19 


SN74LS138 


TTL 3-to-8 Line Decoder 


U20 


SN74LS21 


TTL Dual 4- Input AND Gate 


_ U21 


MC14001B 


CMOS Quad 2-Input NOR Gate 


U22 


SN74LS138 


TTL 3-to-8 Line Decoder 


U23 


SN74LS138 


TTL 3-to-8 Line Decoder 


U24 


SN74LS138 


TTL 3- to-8 Line Decoder 


U25 


MC6808** 


NMOS Microprocessor (MPU) with Clock 


U26 


MC6889/MC8T28 


Linear Quad Bus Transceiver 


U27 


MC6809/MC8T28 


Linear Quad Bus Transceiver 


U28 


SN74LS08 


TTL Quad 2-Input AND Gate 


_ U29 


SN74LS08 


TTL Quad 2-Input AND Gate 



MCM 2114-45 NMOS IK X 4 Static RAMS 

U30 _ U40 U50*** 

U31 U41 ; U51 

U32 _ U42*** . U52 

U33*** U43 U53 

U34 ' U44*** U54 

U35*** U45 U55 

U36 U46 U56 

U37 U47 U57 

U38 , U48*** - U58 

U39 U49 U59 



*** These memories are required for the minimal system. 



MicroChroma 68 Assembly Parts List (Continued) 



Miscellaneous Components 

Ref Des Description 

_ SI Momentary SPDT (Break) 

S2 Momentary SPST (Reset) 

_ S3 DPDT Switch (60dB 9 RF) 

. Yl 3.579545 MHz Crystal 
_ Ql 2N2222A Transistor 

Cherry "PRO" Keyboard (Cherry P/N B70-05AB) or equivalent 

with 24 pin header compatible with Jl 

LI .luH adjustable Inductor 

Tl 75 to 300 Matching Transformer 

P2 Phone plug with compatible RF interconnect cable 

P3 Phono plug with compatible audio interconnect cable 

____ P4 Phono plug with compatible audio interconnect cable 

Vestigal Sideband Filter tuned to pass desired channel frequency. 

PCB ** MicroChroma 68 Printed Circuit Board (Motorola P/N SCPR0M02PCB) 

Dl IN914 Signal Diode 

_D2 IN914 Signal Diode 

** Included in MicroChroma 68 Kit (Motorola P/N SCPR0M02) 



DEAR MICROCHROMA 68 PURCHASER: 

A USERS MANUAL CONTAINING THE SOURCE LISTING FOR TVBUG, 
AND USEFUL APPLICATIONS HARDWARE AND SOFTWARE WILL BE 
AVAILABLE SHORTLY. TO ENSURE THAT YOU RECEIVE YOUR COPY 
AS SOON AS IT IS AVAILABLE, SEND IN THE BOTTOM HALF OF 
THIS SHEET. IF YOU EXPERIENCE ANY PROBLEM OR WISH TO 
SHARE OTHER USEFUL INFORMATION, CALL THE "MICROCHROMA 
HOTLINE" (512) 928-6878. 



TO: Motorola Mi crocomponent Applications 
MS F2605 Attn: MicroChroma 68 
3501 Ed Bluestein Blvd. 
Austin, Texas 78721 

SIRS: PLEASE SEND THE TVBUG APPLICATIONS MANUAL TO; 

NAME 

ADDRESS 



CIRY 



STATE 



ZIP CODE 



MOTOROLA INC. Integrated Circuits Division 

3501 ED BLUSTEIN BLVD., AUSTIN, TEXAS 78721